From 8b7da14b823145646da44e10cced0adeaa29d884 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Apr 2004 22:07:53 +0000 Subject: [PATCH] added some assertions, just to be safe --- src/mesa/main/dlist.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index ef9c74fb743..b99d71bb544 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -4639,6 +4639,7 @@ static void save_Attr1f( GLenum attr, GLfloat x ) n[2].f = x; } + ASSERT(attr < VERT_ATTRIB_MAX); ctx->ListState.ActiveAttribSize[attr] = 1; ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, 0, 0, 1); @@ -4659,6 +4660,7 @@ static void save_Attr2f( GLenum attr, GLfloat x, GLfloat y ) n[3].f = y; } + ASSERT(attr < VERT_ATTRIB_MAX); ctx->ListState.ActiveAttribSize[attr] = 2; ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, 0, 1); @@ -4680,6 +4682,7 @@ static void save_Attr3f( GLenum attr, GLfloat x, GLfloat y, GLfloat z ) n[4].f = z; } + ASSERT(attr < VERT_ATTRIB_MAX); ctx->ListState.ActiveAttribSize[attr] = 3; ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, z, 1); @@ -4703,6 +4706,7 @@ static void save_Attr4f( GLenum attr, GLfloat x, GLfloat y, GLfloat z, n[5].f = w; } + ASSERT(attr < VERT_ATTRIB_MAX); ctx->ListState.ActiveAttribSize[attr] = 4; ASSIGN_4V( ctx->ListState.CurrentAttrib[attr], x, y, z, w); -- 2.30.2