Fix return omission with else-after-return (bug 4852, r=fyren).
Fix return omission with else-after-return (
bug 4852, r=fyren).
1.1 --- a/sourcepawn/compiler/sc1.c Wed Jul 06 17:50:37 2011 -0400
1.2 +++ b/sourcepawn/compiler/sc1.c Wed Jul 06 17:55:14 2011 -0400
1.3 @@ -5973,12 +5973,6 @@
1.4 setlabel(flab1); /* print false label */
1.5 statement(NULL,FALSE); /* do "else" clause */
1.6 setlabel(flab2); /* print true label */
1.7 - /* if both the "true" branch and the "false" branch ended with the same
1.8 - * kind of statement, set the last statement id to that kind, rather than
1.9 - * to the generic tIF; this allows for better "unreachable code" checking
1.10 - */
1.11 - if (lastst==lastst_true)
1.12 - return lastst;
1.13 } /* if */
1.14 return tIF;
1.15 }