Mesa (master): intel: Avoid pointer arithmetic on void *.

Eric Anholt anholt at kemper.freedesktop.org
Wed Jul 1 05:59:19 UTC 2009


Module: Mesa
Branch: master
Commit: 5e6b593d35156a0068dc0eb3e55dec086f1cadd3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e6b593d35156a0068dc0eb3e55dec086f1cadd3

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Jun 30 22:57:56 2009 -0700

intel: Avoid pointer arithmetic on void *.

Bug #22000.

---

 src/mesa/drivers/dri/intel/intel_mipmap_tree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
index a0d8f0c..311fe01 100644
--- a/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
+++ b/src/mesa/drivers/dri/intel/intel_mipmap_tree.c
@@ -479,7 +479,7 @@ intel_miptree_image_data(struct intel_context *intel,
 			0, 0,                             /* source x, y */
 			dst->level[level].width, height); /* width, height */
 
-      src += src_image_pitch * dst->cpp;
+      src = (char *)src + src_image_pitch * dst->cpp;
    }
 }
 




More information about the mesa-commit mailing list