mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix savestate ROM check
This commit is contained in:
parent
596c7503b6
commit
cd2533edce
src/gba
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue