mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 09:20:13 +01:00
mesa: fix baseLevel >= MAX_TEXTURE_LEVELS test
This fixes invalid array indexing when baseLevel == MAX_TEXTURE_LEVELS. See bug 25528.
This commit is contained in:
parent
33a120e476
commit
3de8fff45d
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue