diff options
Diffstat (limited to 'mesalib/src/mesa/main/api_validate.c')
-rw-r--r-- | mesalib/src/mesa/main/api_validate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c index b6871d0db..1ae491f25 100644 --- a/mesalib/src/mesa/main/api_validate.c +++ b/mesalib/src/mesa/main/api_validate.c @@ -187,7 +187,7 @@ check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type, vbo_get_minmax_indices(ctx, &prim, &ib, &min, &max, 1); if ((int)(min + basevertex) < 0 || - max + basevertex > ctx->Array.ArrayObj->_MaxElement) { + max + basevertex >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDrawElements() index=%u is out of bounds (max=%u)", max, ctx->Array.ArrayObj->_MaxElement); |