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.
This commit is contained in:
Neil Roberts 2010-07-08 18:33:45 +01:00
parent d3ea1ec6f8
commit 0fbdafd318

View File

@ -1232,7 +1232,7 @@ cogl_texture_get_data (CoglHandle handle,
{ {
src = new_bmp.data + y * new_bmp.rowstride; src = new_bmp.data + y * new_bmp.rowstride;
dst = data + y * rowstride; dst = data + y * rowstride;
memcpy (dst, src, new_bmp.width); memcpy (dst, src, new_bmp.width * bpp);
} }
/* Free converted data */ /* Free converted data */