From: Roland Scheidegger Date: Wed, 1 Feb 2006 01:05:40 +0000 (+0000) Subject: fix test for valid texunit in _mesa_ClientActiveTextureARB X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3b6f62fc736d8f337897e2cefbfa15d6d77586f3;p=mesa.git fix test for valid texunit in _mesa_ClientActiveTextureARB --- 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; }