From 5a7976c925e494bfd0db806c5f5724157236b4e3 Mon Sep 17 00:00:00 2001 From: Charles Crayne Date: Wed, 26 Mar 2008 17:20:21 -0700 Subject: Restore critical expression checking when optimizer enabled In the prior code, enabling optimization effectively diabled critical expression checking, because the optimization passes took place before checking was enabled. --- parser.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parser.c b/parser.c index 6e6a052..5983af5 100644 --- a/parser.c +++ b/parser.c @@ -323,7 +323,8 @@ restart_parse: result->opcode == I_RESD || result->opcode == I_RESQ || result->opcode == I_REST || result->opcode == I_RESO || result->opcode == I_EQU || result->opcode == I_INCBIN) { - critical = pass0; + critical = (pass0 < 2 ? 1 : 2); + } else critical = (pass == 2 ? 2 : 0); -- cgit v1.2.3