GBA: Fix savestate ROM check

This commit is contained in:
Jeffrey Pfau 2015-06-08 01:24:03 -07:00
parent 596c7503b6
commit cd2533edce
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ void GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) {
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) {