aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_reader.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-09-08 10:54:11 +0200
committermarha <marha@users.sourceforge.net>2011-09-08 10:54:11 +0200
commit23a7aebae0a742d94ffe2304357dcc1234a99155 (patch)
tree08dbd7956bbd1c5717967a4f904f8383139bbe1e /mesalib/src/glsl/ir_reader.cpp
parent53da0b7e7c183ea15692234332b3e337b3fb0cc0 (diff)
downloadvcxsrv-23a7aebae0a742d94ffe2304357dcc1234a99155.tar.gz
vcxsrv-23a7aebae0a742d94ffe2304357dcc1234a99155.tar.bz2
vcxsrv-23a7aebae0a742d94ffe2304357dcc1234a99155.zip
mesa git update 8 sep 2011
Diffstat (limited to 'mesalib/src/glsl/ir_reader.cpp')
-rw-r--r--mesalib/src/glsl/ir_reader.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/mesalib/src/glsl/ir_reader.cpp b/mesalib/src/glsl/ir_reader.cpp
index 22009eebc..2d0bccb78 100644
--- a/mesalib/src/glsl/ir_reader.cpp
+++ b/mesalib/src/glsl/ir_reader.cpp
@@ -777,7 +777,7 @@ ir_reader::read_constant(s_expression *expr)
ir_constant_data data = { { 0 } };
// Read in list of values (at most 16).
- int k = 0;
+ unsigned k = 0;
foreach_iter(exec_list_iterator, it, values->subexpressions) {
if (k >= 16) {
ir_read_error(values, "expected at most 16 numbers");
@@ -820,6 +820,11 @@ ir_reader::read_constant(s_expression *expr)
}
++k;
}
+ if (k != type->components()) {
+ ir_read_error(values, "expected %u constant values, found %u",
+ type->components(), k);
+ return NULL;
+ }
return new(mem_ctx) ir_constant(type, &data);
}