all repos — mgba @ 0df180c0d010b4571ad024134dfbee23f9646728

mGBA Game Boy Advance Emulator

GB Serialize: Fix loading states with negative pixel x (fixes #1293)
Vicki Pfau vi@endrift.com
Tue, 12 Feb 2019 09:20:37 -0800
commit

0df180c0d010b4571ad024134dfbee23f9646728

parent

cab3a2272d6819387c096aa3591eeb230e114d9c

2 files changed, 2 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -9,6 +9,7 @@ - Switch: Fix final cleanup (fixes mgba.io/i/1283)

- Qt: Fix tile and sprite views not always displaying at first - GBA Memory: Fix a few AGBPrint crashes - GBA Memory: Fix OOB ROM reads showing up as AGBPrint memory + - GB Serialize: Fix loading states with negative pixel x (fixes mgba.io/i/1293) Misc: - GBA Savedata: EEPROM performance fixes - GBA Savedata: Automatically map 1Mbit Flash files as 1Mbit Flash
M src/gb/serialize.csrc/gb/serialize.c

@@ -113,7 +113,7 @@ mLOG(GB_STATE, WARN, "Savestate is corrupted: CPU cycles are too high");

error = true; } LOAD_16LE(check16, 0, &state->video.x); - if (check16 < 0 || check16 > GB_VIDEO_HORIZONTAL_PIXELS) { + if (check16 < -7 || check16 > GB_VIDEO_HORIZONTAL_PIXELS) { mLOG(GB_STATE, WARN, "Savestate is corrupted: video x is out of range"); error = true; }