check banks overflow
This commit is contained in:
parent
f7f30d47dc
commit
a2e59da716
|
@ -1639,6 +1639,11 @@ static void api_load(tic_cartridge* cart, const u8* buffer, s32 size, bool palet
|
||||||
}
|
}
|
||||||
|
|
||||||
buffer += chunk.size;
|
buffer += chunk.size;
|
||||||
|
|
||||||
|
// check banks overflow
|
||||||
|
for(s32 i = 0; i < sizeof bank / sizeof(s32); i++)
|
||||||
|
if(((s32*)&bank)[i] >= TIC_BANKS)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef LOAD_CHUNK
|
#undef LOAD_CHUNK
|
||||||
|
|
Loading…
Reference in New Issue