Fix indexing into an empty array
Signed-off-by: elelel <elelel@3wh.net>
This commit is contained in:
parent
526206aabe
commit
be34e323e5
1 changed files with 1 additions and 1 deletions
|
|
@ -58,7 +58,7 @@ def main(parse_args):
|
||||||
file_stack.append(header)
|
file_stack.append(header)
|
||||||
else:
|
else:
|
||||||
# popped back up to an earlier header
|
# popped back up to an earlier header
|
||||||
while file_stack[-1] != header:
|
while (len(file_stack) > 0) and (file_stack[-1] != header):
|
||||||
file_stack.pop()
|
file_stack.pop()
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue