summaryrefslogtreecommitdiff
path: root/src/mesa/shader/program_parse.tab.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2009-10-20 10:58:14 -0700
committerIan Romanick <ian.d.romanick@intel.com>2009-10-22 19:20:15 -0700
commitdd245016657c599ecf24c4abe999319f9c870c47 (patch)
tree7316bb394e1e98137eb7ffa666e8a7d919103e5b /src/mesa/shader/program_parse.tab.c
parent55058652b886b95bfc24109a9edb04d274c01c1a (diff)
ARB prog parser: Fix parameter array size comparison
Array indexes are invalid when >= the maximum, but array sizes are only in valid when > the maximum. This prevented programs from declaring a single maximum size array. See the piglit vp-max-array test.
Diffstat (limited to 'src/mesa/shader/program_parse.tab.c')
-rw-r--r--src/mesa/shader/program_parse.tab.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/shader/program_parse.tab.c b/src/mesa/shader/program_parse.tab.c
index 9f2d4de90fc..c255e912ed2 100644
--- a/src/mesa/shader/program_parse.tab.c
+++ b/src/mesa/shader/program_parse.tab.c
@@ -3109,7 +3109,7 @@ yyreduce:
/* Line 1455 of yacc.c */
#line 1041 "program_parse.y"
{
- if (((yyvsp[(1) - (1)].integer) < 1) || ((unsigned) (yyvsp[(1) - (1)].integer) >= state->limits->MaxParameters)) {
+ if (((yyvsp[(1) - (1)].integer) < 1) || ((unsigned) (yyvsp[(1) - (1)].integer) > state->limits->MaxParameters)) {
yyerror(& (yylsp[(1) - (1)]), state, "invalid parameter array size");
YYERROR;
} else {