mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
glib-mkenums: Don't go into an infinite loop trying to find a matching {
If we reach EOF before this happens, error out as opposed to looping around forever. https://bugzilla.gnome.org/show_bug.cgi?id=794506
This commit is contained in:
parent
7027a128c1
commit
5e02a9f8af
@ -495,6 +495,8 @@ def process_file(curfilename):
|
||||
if groups[0] is None and (len(groups) < 4 or groups[3] is None):
|
||||
while True:
|
||||
line = curfile.readline()
|
||||
if not line:
|
||||
print_error("Syntax error when looking for opening { in enum")
|
||||
if re.match(r'\s*\{', line):
|
||||
break
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user