mirror of
https://github.com/gbdev/rgbds.git
synced 2026-09-03 20:38:39 +00:00
Correct error message for macro arg \<-INT_MIN>
This commit is contained in:
+1
-1
@@ -542,7 +542,7 @@ static uint32_t readBracketedMacroArgNum() {
|
||||
}
|
||||
}
|
||||
uint32_t n = readNumber<10>(bumpChar(), nullptr);
|
||||
if (n > INT32_MAX) {
|
||||
if (n > INT32_MAX && !(negative && n == static_cast<uint32_t>(INT32_MAX) + 1)) {
|
||||
error("Number in bracketed macro argument is too large");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user