GB: Fix crash when masking savedata

This commit is contained in:
Jeffrey Pfau 2016-12-19 18:47:20 -08:00
parent 9ec050bfcb
commit 258815fa3b
2 changed files with 2 additions and 0 deletions

View File

@ -24,6 +24,7 @@ Bugfixes:
- ARM7: PSR mode bits should not get sign extended
- GBA Video: Fix out of bounds sprite transforms
- GBA: Only unhalt CPU if appropriate bit is set in IE
- GB: Fix crash when masking savedata
Misc:
- PSP2: Improved controller rumble
- GB, GBA: Prevent loading null ROMs

View File

@ -222,6 +222,7 @@ void GBSavedataMask(struct GB* gb, struct VFile* vf, bool writeback) {
gb->sramVf = vf;
gb->sramMaskWriteback = writeback;
gb->memory.sram = vf->map(vf, gb->sramSize, MAP_READ);
GBMBCSwitchSramBank(gb, gb->memory.sramCurrentBank);
}
void GBSavedataUnmask(struct GB* gb) {