From: Michal Krol Date: Tue, 24 Nov 2009 10:17:16 +0000 (+0100) Subject: mesa: Fix pointer arithmetic. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53d9b7d361915d6cf33b73017789e746342cc453;p=mesa.git mesa: Fix pointer arithmetic. --- diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 008407210d9..bd7cc8d2780 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -554,7 +554,9 @@ _mesa_get_compressed_teximage(GLcontext *ctx, GLenum target, GLint level, GLuint bw, bh; _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh); for (i = 0; i < (texImage->Height + bh - 1) / bh; i++) { - memcpy(img + i * row_stride, texImage->Data + i * row_stride_stored, row_stride); + memcpy((GLubyte *)img + i * row_stride, + (GLubyte *)texImage->Data + i * row_stride_stored, + row_stride); } }