GB, GBA Savedata: Fix unmasking savedata crash
Vicki Pfau vi@endrift.com
Sat, 15 Sep 2018 23:12:29 -0700
3 files changed,
3 insertions(+),
2 deletions(-)
M
CHANGES
→
CHANGES
@@ -52,6 +52,7 @@ - GBA: Reset WAITCNT properly
- GBA Serialize: Fix loading states in Hblank - PSP2: Fix more issues causing poor audio - GBA Memory: Fix Vast Fame support (taizou) (fixes mgba.io/i/1170) + - GB, GBA Savedata: Fix unmasking savedata crash Misc: - GBA Timer: Use global cycles for timers - GBA: Extend oddly-sized ROMs to full address space (fixes mgba.io/i/722)
M
src/gb/gb.c
→
src/gb/gb.c
@@ -256,7 +256,7 @@ GBMBCSwitchSramBank(gb, gb->memory.sramCurrentBank);
} void GBSavedataUnmask(struct GB* gb) { - if (gb->sramVf == gb->sramRealVf) { + if (!gb->sramRealVf || gb->sramVf == gb->sramRealVf) { return; } struct VFile* vf = gb->sramVf;
M
src/gba/savedata.c
→
src/gba/savedata.c
@@ -95,7 +95,7 @@ GBASavedataForceType(savedata, type);
} void GBASavedataUnmask(struct GBASavedata* savedata) { - if (savedata->vf == savedata->realVf) { + if (!savedata->realVf || savedata->vf == savedata->realVf) { return; } enum SavedataType type = savedata->type;