From: Zou Nan hai Date: Fri, 9 Feb 2007 05:28:56 +0000 (+0800) Subject: array overflow fix X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fcccf8943213a20957f305161e8aae7fef55baab;p=mesa.git array overflow fix --- diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index f96df5f1643..7ea55470acb 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: