reset bank indexes when cart is changed
@@ -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);
