mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Fix two instances of possible infinite loops in the linker (#1292)
This commit is contained in:
@@ -281,6 +281,7 @@ try_again: // Can't use a `do {} while(0)` loop, otherwise compilers (wrongly) t
|
|||||||
uint32_t number = c - '0';
|
uint32_t number = c - '0';
|
||||||
for (c = context.file.sgetc(); isDecDigit(c); c = context.file.sgetc()) {
|
for (c = context.file.sgetc(); isDecDigit(c); c = context.file.sgetc()) {
|
||||||
number = number * 10 + (c - '0');
|
number = number * 10 + (c - '0');
|
||||||
|
context.file.sbumpc();
|
||||||
}
|
}
|
||||||
return yy::parser::make_number(number);
|
return yy::parser::make_number(number);
|
||||||
} else if (isIdentChar(c)) { // Note that we match these *after* digit characters!
|
} else if (isIdentChar(c)) { // Note that we match these *after* digit characters!
|
||||||
@@ -319,6 +320,7 @@ try_again: // Can't use a `do {} while(0)` loop, otherwise compilers (wrongly) t
|
|||||||
if (c == EOF) {
|
if (c == EOF) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
context.file.sbumpc();
|
||||||
}
|
}
|
||||||
goto try_again;
|
goto try_again;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user