From 8091aa86337b5541e70f0a83bc9b13c55faec559 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 22 May 2009 14:28:24 -0600 Subject: [PATCH] mesa: use Elements() for loop limit --- src/mesa/main/attrib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 51b653fb744..476a24434cc 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1342,9 +1342,9 @@ adjust_buffer_object_ref_counts(struct gl_array_object *arrayObj, GLint step) arrayObj->FogCoord.BufferObj->RefCount += step; arrayObj->Index.BufferObj->RefCount += step; arrayObj->EdgeFlag.BufferObj->RefCount += step; - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) + for (i = 0; i < Elements(arrayObj->TexCoord); i++) arrayObj->TexCoord[i].BufferObj->RefCount += step; - for (i = 0; i < VERT_ATTRIB_MAX; i++) + for (i = 0; i < Elements(arrayObj->VertexAttrib); i++) arrayObj->VertexAttrib[i].BufferObj->RefCount += step; } -- 2.30.2