When error-checking 'unit' against num_texture_units, need to use >=, not >.
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 9 May 2006 14:36:58 +0000 (14:36 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 9 May 2006 14:36:58 +0000 (14:36 +0000)
See bug 6863.

src/glx/x11/indirect_vertex_array.c

index 2a8c68eec8c425459fe41626f2a21bfc37c248e8..24bca425a2e3a11bf44ed4eb713f0487278c8288 100644 (file)
@@ -1591,7 +1591,7 @@ void __indirect_glClientActiveTextureARB(GLenum texture)
     const GLint unit = (GLint) texture - GL_TEXTURE0;
 
 
-    if ( (unit < 0) || (unit > arrays->num_texture_units) ) {
+    if ( (unit < 0) || (unit >= arrays->num_texture_units) ) {
        __glXSetError(gc, GL_INVALID_ENUM);
        return;
     }