From eb24d2a252b33ce86f9bfa476b12c683d88a4776 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. --- clutter/cogl/cogl/cogl-texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clutter/cogl/cogl/cogl-texture.c b/clutter/cogl/cogl/cogl-texture.c index 8f2b3e2fd..7e8087933 100644 --- a/clutter/cogl/cogl/cogl-texture.c +++ b/clutter/cogl/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 */