Prevent deinitializing savegame data when the data is not masked
Jeffrey Pfau jeffrey@endrift.com
Tue, 21 Oct 2014 22:08:20 -0700
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba-savedata.c
→
src/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;