all repos — mgba @ b11528c69df86c3be49ac4715495d38b1309b53e

mGBA Game Boy Advance Emulator

Prevent deinitializing savegame data when the data is not masked
Jeffrey Pfau jeffrey@endrift.com
Tue, 21 Oct 2014 22:08:20 -0700
commit

b11528c69df86c3be49ac4715495d38b1309b53e

parent

501b6b621c6c27cbb5523f53172e00c426a8b445

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/gba/gba-savedata.csrc/gba/gba-savedata.c

@@ -70,6 +70,9 @@ savedata->mapMode = MAP_READ;

} void GBASavedataUnmask(struct GBASavedata* savedata) { + if (savedata->mapMode != MAP_READ) { + return; + } GBASavedataDeinit(savedata); savedata->vf = savedata->realVf; savedata->mapMode = MAP_WRITE;