all repos — mgba @ cd2533edce880ab07fcc1b206cefe4c4b20040f3

mGBA Game Boy Advance Emulator

GBA: Fix savestate ROM check
Jeffrey Pfau jeffrey@endrift.com
Mon, 08 Jun 2015 01:24:03 -0700
commit

cd2533edce880ab07fcc1b206cefe4c4b20040f3

parent

596c7503b62ae8762b77840850790f26381f7392

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M src/gba/serialize.csrc/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) {