From ebb991ca0d7de103dc068397ed91744bf40ee58f Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 22 May 2009 14:16:00 -0600 Subject: [PATCH] mesa: use Elements() for loop bound --- src/mesa/main/bufferobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c index eefc1b04fa2..90daa2e5b89 100644 --- a/src/mesa/main/bufferobj.c +++ b/src/mesa/main/bufferobj.c @@ -800,10 +800,10 @@ _mesa_DeleteBuffersARB(GLsizei n, const GLuint *ids) unbind(ctx, &arrayObj->FogCoord.BufferObj, bufObj); unbind(ctx, &arrayObj->Index.BufferObj, bufObj); unbind(ctx, &arrayObj->EdgeFlag.BufferObj, bufObj); - for (j = 0; j < MAX_TEXTURE_COORD_UNITS; j++) { + for (j = 0; j < Elements(arrayObj->TexCoord); j++) { unbind(ctx, &arrayObj->TexCoord[j].BufferObj, bufObj); } - for (j = 0; j < VERT_ATTRIB_MAX; j++) { + for (j = 0; j < Elements(arrayObj->VertexAttrib); j++) { unbind(ctx, &arrayObj->VertexAttrib[j].BufferObj, bufObj); } -- 2.30.2