mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Fix off-by-one error in "scramble spec" validation (#1144)
This commit is contained in:
@@ -310,7 +310,7 @@ static void parseScrambleSpec(char const *spec)
|
|||||||
}
|
}
|
||||||
spec = endptr;
|
spec = endptr;
|
||||||
|
|
||||||
if (region != SCRAMBLE_UNK && limit >= scrambleSpecs[region].max) {
|
if (region != SCRAMBLE_UNK && limit > scrambleSpecs[region].max) {
|
||||||
argErr('S', "Limit for region \"%.*s\" may not exceed %" PRIu16,
|
argErr('S', "Limit for region \"%.*s\" may not exceed %" PRIu16,
|
||||||
regionNamePrintLen, regionName, scrambleSpecs[region].max);
|
regionNamePrintLen, regionName, scrambleSpecs[region].max);
|
||||||
limit = scrambleSpecs[region].max;
|
limit = scrambleSpecs[region].max;
|
||||||
|
|||||||
Reference in New Issue
Block a user