summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorZou Nan hai <nanhai.zou@intel.com>2007-02-09 13:28:56 +0800
committerZou Nan hai <nanhai.zou@intel.com>2007-02-09 13:28:56 +0800
commitfcccf8943213a20957f305161e8aae7fef55baab (patch)
treefc4f67c6627a5149ca44237d1ed13d6365a1610e /src/mesa
parent421ce180f52ff55b866066fabd861a51dd6d2b26 (diff)
array overflow fix
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index f96df5f164..7ea55470ac 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -147,8 +147,8 @@ static void recalculate_input_bindings( GLcontext *ctx )
/* Could use just about anything, just to fill in the empty
* slots:
*/
- for (i = MAT_ATTRIB_MAX; i < VERT_ATTRIB_MAX; i++)
- inputs[i] = &vbo->generic_currval[i - VERT_ATTRIB_GENERIC0];
+ for (i = MAT_ATTRIB_MAX; i < VERT_ATTRIB_MAX - VERT_ATTRIB_GENERIC0; i++)
+ inputs[VERT_ATTRIB_GENERIC0 + i] = &vbo->generic_currval[i];
break;
case VP_NV: