mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-06 04:05:38 +00:00
Don't forget to initialize additional banks when using an overlay
This commit is contained in:
1 parent
d6a43f6a53
commit
babf36e96e
1 file changed
+5
@@ -111,6 +111,11 @@ static void checkOverlay(void)
|
||||
nbOverlayBanks);
|
||||
if (!sections[SECTTYPE_ROMX].banks)
|
||||
err(1, "Failed to realloc banks for overlay");
|
||||
for (uint32_t i = sections[SECTTYPE_ROMX].nbBanks;
|
||||
i < nbOverlayBanks; i++) {
|
||||
sections[SECTTYPE_ROMX].banks[i].sections = NULL;
|
||||
sections[SECTTYPE_ROMX].banks[i].zeroLenSections = NULL;
|
||||
}
|
||||
sections[SECTTYPE_ROMX].nbBanks = nbOverlayBanks;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user