mirror of
https://github.com/gbdev/rgbds.git
synced 2026-05-09 03:19:35 +00:00
Fix invalid character in bracketed macro argument
The invalid character should not be consumed by `shiftChar()`.
This commit is contained in:
+4
-2
@@ -582,11 +582,13 @@ static uint32_t readBracketedMacroArgNum() {
|
||||
empty = true;
|
||||
}
|
||||
|
||||
c = bumpChar();
|
||||
c = peek();
|
||||
if (c != '>') {
|
||||
error("Invalid character %s in bracketed macro argument", printChar(c));
|
||||
return 0;
|
||||
} else if (empty) {
|
||||
}
|
||||
shiftChar();
|
||||
if (empty) {
|
||||
error("Empty bracketed macro argument");
|
||||
return 0;
|
||||
} else if (num == 0 && !symbolError) {
|
||||
|
||||
Reference in New Issue
Block a user