From: Brian Paul Date: Fri, 22 May 2009 20:27:42 +0000 (-0600) Subject: mesa: use Elements() for loop limit X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2a3d118a8e4c048e5d850a29301c02f886ba09d4;p=mesa.git mesa: use Elements() for loop limit --- diff --git a/src/mesa/main/api_arrayelt.c b/src/mesa/main/api_arrayelt.c index 703eeebfc33..f5b7d1e1385 100644 --- a/src/mesa/main/api_arrayelt.c +++ b/src/mesa/main/api_arrayelt.c @@ -1153,7 +1153,7 @@ static void _ae_update_state( GLcontext *ctx ) } /* generic vertex attribute arrays */ - for (i = 1; i < VERT_ATTRIB_MAX; i++) { /* skip zero! */ + for (i = 1; i < Elements(arrayObj->VertexAttrib); i++) { /* skip zero! */ struct gl_client_array *attribArray = &arrayObj->VertexAttrib[i]; if (attribArray->Enabled) { at->array = attribArray;