fix test for valid texunit in _mesa_ClientActiveTextureARB
authorRoland Scheidegger <rscheidegger@gmx.ch>
Wed, 1 Feb 2006 01:05:40 +0000 (01:05 +0000)
committerRoland Scheidegger <rscheidegger@gmx.ch>
Wed, 1 Feb 2006 01:05:40 +0000 (01:05 +0000)
src/mesa/main/texstate.c

index 608dbc1088a8d7b549f7568db3e3a9418ddb047b..46cebe91067b0ce3b114805978182b90d0c70e20 100644 (file)
@@ -2692,7 +2692,7 @@ _mesa_ClientActiveTextureARB( GLenum target )
    GLuint texUnit = target - GL_TEXTURE0;
    ASSERT_OUTSIDE_BEGIN_END(ctx);
 
-   if (texUnit > ctx->Const.MaxTextureUnits) {
+   if (texUnit >= ctx->Const.MaxTextureUnits) {
       _mesa_error(ctx, GL_INVALID_ENUM, "glClientActiveTexture(target)");
       return;
    }