Fix multicart loading with only one cart

This commit is contained in:
OV2 2016-10-07 21:40:17 +02:00
parent 26914fa9b0
commit 357fead53b
1 changed files with 3 additions and 3 deletions

View File

@ -1871,9 +1871,9 @@ bool8 CMemory::LoadMultiCartInt ()
if(Multi.cartType == 4 && Multi.cartOffsetA == 0) { // try to load bios from file
Multi.cartOffsetA = 0x40000;
if(Multi.cartSizeA)
memmove(ROM + Multi.cartOffsetA,ROM,Multi.cartOffsetB - Multi.cartOffsetA);
else // clear cart A so the bios can detect that it's not present
memset(ROM,0,Multi.cartOffsetB);
memmove(ROM + Multi.cartOffsetA, ROM, Multi.cartSizeA + Multi.cartSizeB);
else if(Multi.cartOffsetB) // clear cart A so the bios can detect that it's not present
memset(ROM, 0, Multi.cartOffsetB);
FILE *fp;
size_t size;