mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 10:42:07 +00:00
Prevent RGBLINK from crashing when getting the bank of a constant
This commit is contained in:
@@ -260,6 +260,11 @@ static int32_t computeRPNExpr(struct Patch const *patch,
|
||||
patch->fileName,
|
||||
fileSymbols[value]->name);
|
||||
value = 1;
|
||||
} else if (!symbol->section) {
|
||||
error("%s: Requested BANK() of non-label symbol \"%s\"",
|
||||
patch->fileName,
|
||||
fileSymbols[value]->name);
|
||||
value = 1;
|
||||
} else {
|
||||
value = symbol->section->bank;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user