From 0fbdafd318b77ddec4296f6f4fbdf5d1fe329f92 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Thu, 8 Jul 2010 18:33:45 +0100 Subject: [PATCH] Fix cogl_texture_get_data when an intermediate buffer is used When an intermediate buffer is used for downloading texture data it was using the wrong byte length for a row so the copy back to the user's buffer would fail. --- cogl/cogl-texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c index 8f2b3e2fd..7e8087933 100644 --- a/cogl/cogl-texture.c +++ b/cogl/cogl-texture.c @@ -1232,7 +1232,7 @@ cogl_texture_get_data (CoglHandle handle, { src = new_bmp.data + y * new_bmp.rowstride; dst = data + y * rowstride; - memcpy (dst, src, new_bmp.width); + memcpy (dst, src, new_bmp.width * bpp); } /* Free converted data */