From: Brian Paul Date: Tue, 9 May 2006 14:36:58 +0000 (+0000) Subject: When error-checking 'unit' against num_texture_units, need to use >=, not >. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=791e7b385adbe865d0fa7b0aff3672095fdc0c7b;p=mesa.git When error-checking 'unit' against num_texture_units, need to use >=, not >. See bug 6863. --- diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c index 2a8c68eec8c..24bca425a2e 100644 --- a/src/glx/x11/indirect_vertex_array.c +++ b/src/glx/x11/indirect_vertex_array.c @@ -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; }