mirror of https://github.com/mgba-emu/mgba.git
GB, GBA Savedata: Fix unmasking savedata crash
This commit is contained in:
parent
3660246a83
commit
69c2969db0
1
CHANGES
1
CHANGES
|
@ -52,6 +52,7 @@ Bugfixes:
|
|||
- 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)
|
||||
|
|
|
@ -256,7 +256,7 @@ void GBSavedataMask(struct GB* gb, struct VFile* vf, bool writeback) {
|
|||
}
|
||||
|
||||
void GBSavedataUnmask(struct GB* gb) {
|
||||
if (gb->sramVf == gb->sramRealVf) {
|
||||
if (!gb->sramRealVf || gb->sramVf == gb->sramRealVf) {
|
||||
return;
|
||||
}
|
||||
struct VFile* vf = gb->sramVf;
|
||||
|
|
|
@ -95,7 +95,7 @@ void GBASavedataMask(struct GBASavedata* savedata, struct VFile* vf, bool writeb
|
|||
}
|
||||
|
||||
void GBASavedataUnmask(struct GBASavedata* savedata) {
|
||||
if (savedata->vf == savedata->realVf) {
|
||||
if (!savedata->realVf || savedata->vf == savedata->realVf) {
|
||||
return;
|
||||
}
|
||||
enum SavedataType type = savedata->type;
|
||||
|
|
Loading…
Reference in New Issue