From c42c08c5e1c2d2642637565cce4eba5742513bac Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 18 Apr 2015 01:26:12 -0700 Subject: [PATCH] GBA Memory: Fix 16-bit bad loads --- src/gba/memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gba/memory.c b/src/gba/memory.c index d68bdd121..65750b472 100644 --- a/src/gba/memory.c +++ b/src/gba/memory.c @@ -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; }