Avoid OOM allocation error from invalid too-high bank numbers

This commit is contained in:
Rangi
2026-08-22 18:31:26 -04:00
parent 8bc7de35f9
commit 0888600cb7
3 changed files with 11 additions and 7 deletions
+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);