mirror of https://github.com/mgba-emu/mgba.git
GB: Fix crash when accessing SRAM if no save loaded and cartridge has no SRAM
This commit is contained in:
parent
f00b7fcf55
commit
3a8ff86d6b
1
CHANGES
1
CHANGES
|
@ -15,6 +15,7 @@ Bugfixes:
|
|||
- Switch: Fix gyroscope orientation (fixes mgba.io/i/1300)
|
||||
- GBA SIO: Prevent writing read-only multiplayer bits
|
||||
- Qt: Fix color picking in sprite view (fixes mgba.io/i/1307)
|
||||
- GB: Fix crash when accessing SRAM if no save loaded and cartridge has no SRAM
|
||||
Misc:
|
||||
- GBA Savedata: EEPROM performance fixes
|
||||
- GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
|
||||
|
|
|
@ -202,7 +202,7 @@ void GBResizeSram(struct GB* gb, size_t size) {
|
|||
if (gb->memory.sram == (void*) -1) {
|
||||
gb->memory.sram = NULL;
|
||||
}
|
||||
} else {
|
||||
} else if (size) {
|
||||
uint8_t* newSram = anonymousMemoryMap(size);
|
||||
if (gb->memory.sram) {
|
||||
if (size > gb->sramSize) {
|
||||
|
|
Loading…
Reference in New Issue