all repos — mgba @ 69c2969db01c900d000e9c7cdba83db0fd8036e2

mGBA Game Boy Advance Emulator

GB, GBA Savedata: Fix unmasking savedata crash
Vicki Pfau vi@endrift.com
Sat, 15 Sep 2018 23:12:29 -0700
commit

69c2969db01c900d000e9c7cdba83db0fd8036e2

parent

3660246a83a60d756dfabd3264520531843d5edb

3 files changed, 3 insertions(+), 2 deletions(-)

jump to
M CHANGESCHANGES

@@ -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.csrc/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.csrc/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;