mirror of https://github.com/mgba-emu/mgba.git
GBA: Fix savestate ROM check
This commit is contained in:
parent
596c7503b6
commit
cd2533edce
|
@ -72,7 +72,7 @@ void GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) {
|
||||||
return;
|
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");
|
GBALog(gba, GBA_LOG_WARN, "Savestate is for a different game");
|
||||||
return;
|
return;
|
||||||
} else if (!gba->memory.rom && state->id != 0) {
|
} else if (!gba->memory.rom && state->id != 0) {
|
||||||
|
|
Loading…
Reference in New Issue