mirror of https://github.com/mgba-emu/mgba.git
GB Serialize: Fix loading states with negative pixel x (fixes #1293)
This commit is contained in:
parent
89c4214988
commit
bab8ce1805
1
CHANGES
1
CHANGES
|
@ -4,6 +4,7 @@ Bugfixes:
|
||||||
- Qt: Fix tile and sprite views not always displaying at first
|
- Qt: Fix tile and sprite views not always displaying at first
|
||||||
- GBA Memory: Fix a few AGBPrint crashes
|
- GBA Memory: Fix a few AGBPrint crashes
|
||||||
- GBA Memory: Fix OOB ROM reads showing up as AGBPrint memory
|
- 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:
|
Misc:
|
||||||
- GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1274)
|
- GBA Video: Improve sprite cycle counting (fixes mgba.io/i/1274)
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ bool GBDeserialize(struct GB* gb, const struct GBSerializedState* state) {
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
LOAD_16LE(check16, 0, &state->video.x);
|
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");
|
mLOG(GB_STATE, WARN, "Savestate is corrupted: video x is out of range");
|
||||||
error = true;
|
error = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue