summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Krol <michal@vmware.com>2009-11-24 11:17:16 +0100
committerMichal Krol <michal@vmware.com>2009-11-24 11:17:16 +0100
commit53d9b7d361915d6cf33b73017789e746342cc453 (patch)
tree74a9361c09108ee2ab80f04b81aa5161ab3f4a0b /src
parent0c54d76f3783091267cb18e6bd23697d024c95b2 (diff)
mesa: Fix pointer arithmetic.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texgetimage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
index 008407210d..bd7cc8d278 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);
}
}