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

Author: Vinson Lee <[email protected]>
Date:   Tue Feb 23 00:19:30 2010 -0800

mesa: Assert that array index is not negative.

---

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

diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 71e40dd..149853f 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];

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

Reply via email to