From 67812d6649d27ec6a8f6a1c9277b686fc3b67475 Mon Sep 17 00:00:00 2001 From: Sunil Sadasivan Date: Thu, 13 May 2010 00:59:06 -0700 Subject: [PATCH] cogl_texture_get_data() copies using wrong width size. For sliced 2D textures, _cogl_texture_2d_sliced_get_data() uses the bitmap width, instead of the rowstride, when memcpy()ing into the dest buffer. Signed-off-by: Robert Bragg --- clutter/cogl/cogl/cogl-texture-2d-sliced.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/cogl/cogl/cogl-texture-2d-sliced.c b/clutter/cogl/cogl/cogl-texture-2d-sliced.c index 8a5697008..e1e3cf42c 100644 --- a/clutter/cogl/cogl/cogl-texture-2d-sliced.c +++ b/clutter/cogl/cogl/cogl-texture-2d-sliced.c @@ -1710,7 +1710,7 @@ _cogl_texture_2d_sliced_get_data (CoglTexture *tex, { src = new_bmp.data + y * new_bmp.rowstride; dst = data + y * rowstride; - memcpy (dst, src, new_bmp.width); + memcpy (dst, src, new_bmp.rowstride); } /* Free converted data */