GBA: Fix savestate ROM check
Jeffrey Pfau jeffrey@endrift.com
Mon, 08 Jun 2015 01:24:03 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gba/serialize.c
→
src/gba/serialize.c
@@ -72,7 +72,7 @@ if (state->cpu.gprs[ARM_PC] < SIZE_BIOS && state->cpu.gprs[ARM_PC] >= 0x20) {
return; } } - if (gba->memory.rom && state->id != ((struct GBACartridge*) gba->memory.rom)->id || memcmp(state->title, ((struct GBACartridge*) gba->memory.rom)->title, sizeof(state->title))) { + if (gba->memory.rom && (state->id != ((struct GBACartridge*) gba->memory.rom)->id || memcmp(state->title, ((struct GBACartridge*) gba->memory.rom)->title, sizeof(state->title)))) { GBALog(gba, GBA_LOG_WARN, "Savestate is for a different game"); return; } else if (!gba->memory.rom && state->id != 0) {