mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-27 09:05:17 +00:00
Avoid OOM allocation error from invalid too-high bank numbers
This commit is contained in:
@@ -72,6 +72,7 @@ void layout_SetSectionType(SectionType type, uint32_t bank) {
|
||||
bank,
|
||||
typeInfo.lastBank
|
||||
);
|
||||
bank = typeInfo.lastBank;
|
||||
}
|
||||
|
||||
setActiveTypeAndIdx(type, bank - typeInfo.firstBank);
|
||||
|
||||
Reference in New Issue
Block a user