Fix return omission with else-after-return (bug 4852, r=fyren).
authorDavid Anderson <dvander@alliedmods.net>
Wed Jul 06 17:55:14 2011 -0400 (2011-07-06)
changeset 3336f15aa1370640
parent 3335 b5969264060e
child 3337 7fb572471a78
Fix return omission with else-after-return (bug 4852, r=fyren).
sourcepawn/compiler/sc1.c
     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  }