diff options
Diffstat (limited to 'src/mesa/shader/nvfragparse.c')
-rw-r--r-- | src/mesa/shader/nvfragparse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/shader/nvfragparse.c b/src/mesa/shader/nvfragparse.c index c359cf35607..e5a34205fbd 100644 --- a/src/mesa/shader/nvfragparse.c +++ b/src/mesa/shader/nvfragparse.c @@ -248,7 +248,7 @@ MatchInstruction(const GLubyte *token) return result; } } - result.opcode = (enum prog_opcode) -1; + result.opcode = MAX_OPCODE; /* i.e. invalid instruction */ return result; } @@ -1320,7 +1320,7 @@ Parse_InstructionSequence(struct parse_state *parseState, /* try to find matching instuction */ instMatch = MatchInstruction(token); - if (instMatch.opcode < 0) { + if (instMatch.opcode >= MAX_OPCODE) { /* bad instruction name */ RETURN_ERROR2("Unexpected token: ", token); } |