From 3b6f62fc736d8f337897e2cefbfa15d6d77586f3 Mon Sep 17 00:00:00 2001 From: Roland Scheidegger Date: Wed, 1 Feb 2006 01:05:40 +0000 Subject: [PATCH] fix test for valid texunit in _mesa_ClientActiveTextureARB --- src/mesa/main/texstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c index 608dbc1088a..46cebe91067 100644 --- a/src/mesa/main/texstate.c +++ b/src/mesa/main/texstate.c @@ -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; } -- 2.30.2