projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
83a5b7e
)
mesa: Assert that array index is not negative.
author
Vinson Lee
<vlee@vmware.com>
Tue, 23 Feb 2010 08:19:30 +0000
(
00:19
-0800)
committer
Vinson Lee
<vlee@vmware.com>
Tue, 23 Feb 2010 08:19:30 +0000
(
00:19
-0800)
src/mesa/main/texcompress_fxt1.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texcompress_fxt1.c
b/src/mesa/main/texcompress_fxt1.c
index 71e40dd3e93ab35055d47dbf78ef954a6c666383..149853f7acdc4bf2dac4282d47251e973503cc1d 100644
(file)
--- 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];