From 92f9b05499de9f0e8eda11d1a75ba7955c9cc602 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 29 Jul 2010 15:54:10 +0800 Subject: gallium: Avoid void pointer arithmetic. This fixes fdo bug #29286. --- src/gallium/drivers/softpipe/sp_draw_arrays.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gallium/drivers/softpipe/sp_draw_arrays.c') diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c index 3a33cdef96..386c8acb8c 100644 --- a/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c @@ -139,8 +139,8 @@ softpipe_draw_vbo(struct pipe_context *pipe, /* Map index buffer, if present */ if (info->indexed && sp->index_buffer.buffer) { - mapped_indices = softpipe_resource(sp->index_buffer.buffer)->data; - mapped_indices += sp->index_buffer.offset; + char *indices = (char *) softpipe_resource(sp->index_buffer.buffer)->data; + mapped_indices = (void *) (indices + sp->index_buffer.offset); } draw_set_mapped_element_buffer_range(draw, (mapped_indices) ? -- cgit v1.2.3