diff options
author | Brian Paul <[email protected]> | 2009-12-09 08:30:01 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-12-09 08:30:05 -0700 |
commit | 3de8fff45d04fd7e702cd656ba97cafd348c3981 (patch) | |
tree | dfcfa5434431ab1e1b7cd225e4cb4950e40c4edc | |
parent | 33a120e4761a661736ea64a3efc2e3831ac5600a (diff) |
mesa: fix baseLevel >= MAX_TEXTURE_LEVELS test
This fixes invalid array indexing when baseLevel == MAX_TEXTURE_LEVELS.
See bug 25528.
-rw-r--r-- | src/mesa/main/texobj.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index da55ac8697d..85f5f78e509 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -418,7 +418,7 @@ _mesa_test_texobj_completeness( const GLcontext *ctx, /* Detect cases where the application set the base level to an invalid * value. */ - if ((baseLevel < 0) || (baseLevel > MAX_TEXTURE_LEVELS)) { + if ((baseLevel < 0) || (baseLevel >= MAX_TEXTURE_LEVELS)) { char s[100]; _mesa_sprintf(s, "base level = %d is invalid", baseLevel); incomplete(t, s); |