mesa: Fix pointer arithmetic.

This commit is contained in:
Michal Krol 2009-11-24 11:17:16 +01:00
parent 0c54d76f37
commit 53d9b7d361
1 changed files with 3 additions and 1 deletions

View File

@ -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);
}
}