projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a012c52
)
Avoid endless loop when encountering EOF while parsing an initializer.
author
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 5 Jul 2012 06:57:58 +0000
(08:57 +0200)
committer
Christoph Mallon
<christoph.mallon@gmx.de>
Thu, 5 Jul 2012 06:57:58 +0000
(08:57 +0200)
parser.c
patch
|
blob
|
history
diff --git
a/parser.c
b/parser.c
index
f0b35d8
..
e311633
100644
(file)
--- a/
parser.c
+++ b/
parser.c
@@
-2107,12
+2107,8
@@
finish_designator:
ARR_APP1(initializer_t*, initializers, sub);
error_parse_next:
- if (
token.kind == '}') {
+ if (
!next_if(','))
break;
- }
- add_anchor_token('}');
- expect(',');
- rem_anchor_token('}');
if (token.kind == '}') {
break;
}