Update the pointer to the last element when putting new elements into the lists of...
authorChristoph Mallon <christoph.mallon@gmx.de>
Sun, 16 Dec 2007 08:42:27 +0000 (08:42 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Sun, 16 Dec 2007 08:42:27 +0000 (08:42 +0000)
[r18775]

parser.c

index 784d677..8b31721 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -5166,10 +5166,11 @@ static statement_t *parse_label_statement(void)
 
        /* remember the labels's in a list for later checking */
        if (label_last == NULL) {
-               label_first = label_last = label_statement;
+               label_first = label_statement;
        } else {
                label_last->next = label_statement;
        }
+       label_last = label_statement;
 
        return (statement_t*) label_statement;
 }
@@ -5354,10 +5355,11 @@ static statement_t *parse_goto(void)
 
        /* remember the goto's in a list for later checking */
        if (goto_last == NULL) {
-               goto_first = goto_last = statement;
+               goto_first = statement;
        } else {
                goto_last->next = statement;
        }
+       goto_last = statement;
 
        expect(';');