Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] check_if always overflow #403

Closed
wants to merge 8 commits into from
Closed
4 changes: 2 additions & 2 deletions simc/simc_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def while_statement(tokens, i, table, in_do, func_ret_type):
# If \n follows ) then skip all the \n characters
if tokens[i + 1].type == "newline":
i += 1
while tokens[i].type == "newline":
while i > len(tokens) and tokens[i].type == "newline":
i += 1
i -= 1

Expand Down Expand Up @@ -896,7 +896,7 @@ def if_statement(tokens, i, table, func_ret_type):
# If \n follows ) then skip all the \n characters
if tokens[i + 1].type == "newline":
i += 1
while tokens[i].type == "newline":
while i > len(tokens) and tokens[i].type == "newline":
i += 1
i -= 1

Expand Down