projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b37c541
)
Fix comparison of unsigned value against < 0.
author
Michel Dänzer
<daenzer@vmware.com>
Thu, 4 Mar 2010 23:15:40 +0000
(
00:15
+0100)
committer
Michel Dänzer
<michel@daenzer.net>
Thu, 4 Mar 2010 23:15:40 +0000
(
00:15
+0100)
src/mesa/main/api_validate.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/api_validate.c
b/src/mesa/main/api_validate.c
index
326ad6f
..
e9359db
100644
(file)
--- 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 "