GBA Memory: Fix 16-bit bad loads

This commit is contained in:
Jeffrey Pfau 2015-04-18 01:26:12 -07:00
parent 0c8a0cd0e4
commit c42c08c5e1
1 changed files with 2 additions and 2 deletions

View File

@ -430,7 +430,7 @@ uint32_t GBALoad16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load16: 0x%08X", address);
LOAD_BAD;
uint32_t v2 = value;
LOAD_16(v2, address & 2, &value);
LOAD_16(value, address & 2, &v2);
}
break;
case REGION_WORKING_RAM:
@ -490,7 +490,7 @@ uint32_t GBALoad16(struct ARMCore* cpu, uint32_t address, int* cycleCounter) {
GBALog(gba, GBA_LOG_GAME_ERROR, "Bad memory Load16: 0x%08X", address);
LOAD_BAD;
uint32_t v2 = value;
LOAD_16(v2, address & 2, &value);
LOAD_16(value, address & 2, &v2);
break;
}