reset bank indexes when cart is changed

This commit is contained in:
BADIM-PC\Vadim 2017-12-20 15:16:42 +03:00
parent 2eacc2bf34
commit 9c43614612
1 changed files with 7 additions and 0 deletions

View File

@ -1067,10 +1067,17 @@ void showDialog(const char** text, s32 rows, DialogCallback callback, void* data
}
}
static void resetBanks()
{
SDL_memset(studio.bank.indexes, 0, sizeof studio.bank.indexes);
}
static void initModules()
{
tic_mem* tic = studio.tic;
resetBanks();
for(s32 i = 0; i < TIC_EDITOR_BANKS; i++)
{
initCode(studio.editor[i].code, studio.tic, &tic->cart.banks[i].code);