fix segfault
So basically, I used i++ on a linked list instead of i->next. As if that wasn't bad enough on its own, it even managed to somehow still work in the 2 test scenarios I gave it. Regardless, it is now fixed.
This commit is contained in:
parent
9f339ed44d
commit
a8be4540b1
2
parse.c
2
parse.c
@ -395,7 +395,7 @@ static void stmt(State *s, Scope *sc, TokListItem *t) {
|
||||
|
||||
/* find beginning of while loop body */
|
||||
TokListItem *lcurl;
|
||||
for (TokListItem *i = t;; i++) {
|
||||
for (TokListItem *i = t;; i = i->next) {
|
||||
if (i == NULL) {
|
||||
mark_err(&start->tok);
|
||||
set_err("Expected '{' after 'while' loop condition");
|
||||
|
Loading…
Reference in New Issue
Block a user