there might be extra commas after } initializer
authorMatthias Braun <matze@braunis.de>
Fri, 23 Nov 2007 00:38:47 +0000 (00:38 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 23 Nov 2007 00:38:47 +0000 (00:38 +0000)
[r18522]

parser.c

index eedba78..2e698fa 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1024,6 +1024,8 @@ static initializer_t *parse_sub_initializer(type_t *type,
                        if(token.type == '}')
                                break;
                        expect_block(',');
+                       if(token.type == '}')
+                               break;
 
                        initializer_t *sub
                                = parse_sub_initializer(element_type, NULL, NULL);