summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-02-23 00:19:30 -0800
committerVinson Lee <vlee@vmware.com>2010-02-23 00:19:30 -0800
commitabcb6b6d01c253627363a05205291630b5247018 (patch)
tree462ddb5155fbe1365c8a16c0888b01641ef2ab16
parent83a5b7e4689dcc36789f567847ccf65db858a9f3 (diff)
mesa: Assert that array index is not negative.
-rw-r--r--src/mesa/main/texcompress_fxt1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 71e40dd3e9..149853f7ac 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -528,6 +528,7 @@ fxt1_lloyd (GLfloat vec[][MAX_COMP], GLint nv,
#else
GLint best = fxt1_bestcol(vec, nv, input[k], nc, &err);
#endif
+ assert(best >= 0);
/* add in closest color */
for (i = 0; i < nc; i++) {
sum[best][i] += input[k][i];