mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-03 10:45:37 +00:00
Avoid OOM allocation error from invalid too-high bank numbers
This commit is contained in:
1 parent
8bc7de35f9
commit
0888600cb7
3 files changed
+11
-7
No files matched your search
@@ -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