Module: Mesa
Branch: master
Commit: 391b396f3fb300a912e6d9bfbf26f49cc30e52df
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=391b396f3fb300a912e6d9bfbf26f49cc30e52df

Author: Michel Dänzer <[email protected]>
Date:   Fri Mar  5 00:15:40 2010 +0100

Fix comparison of unsigned value against < 0.

---

 src/mesa/main/api_validate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 326ad6f..e9359db 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 ((int)(min + basevertex) < 0 ||
        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 "

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to