Skip to content
Snippets Groups Projects
Commit 3de8fff4 authored by Brian Paul's avatar Brian Paul
Browse files

mesa: fix baseLevel >= MAX_TEXTURE_LEVELS test

This fixes invalid array indexing when baseLevel == MAX_TEXTURE_LEVELS.
See bug 25528.
parent 33a120e4
No related branches found
No related tags found
Loading
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment