From: Vinson Lee Date: Thu, 4 Mar 2010 09:24:44 +0000 (-0800) Subject: mesa: Fix unsigned comparison. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9504e75f02586a8561733e0e2711c65efa2979d;p=mesa.git mesa: Fix unsigned comparison. --- diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index 326ad6f909b..80bc826d21d 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -147,7 +147,7 @@ check_index_bounds(GLcontext *ctx, GLsizei count, GLenum type, vbo_get_minmax_index(ctx, &prim, &ib, &min, &max); - if (min + basevertex < 0 || + if (min < basevertex || 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 "