Avoid OOM allocation error from invalid too-high bank numbers

This commit is contained in:
Rangi committed 2026-08-22 18:31:26 -04:00
1 parent 8bc7de35f9
commit 0888600cb7
3 files changed
+11 -7

No files matched your search

+1
View File
@@ -72,6 +72,7 @@ void layout_SetSectionType(SectionType type, uint32_t bank) {
bank,
typeInfo.lastBank
);
bank = typeInfo.lastBank;
}
setActiveTypeAndIdx(type, bank - typeInfo.firstBank);