GB Deserialize: Fix DMA check
Jeffrey Pfau jeffrey@endrift.com
Mon, 12 Sep 2016 20:02:58 -0700
1 files changed,
1 insertions(+),
1 deletions(-)
jump to
M
src/gb/serialize.c
→
src/gb/serialize.c
@@ -133,7 +133,7 @@ mLOG(GB_STATE, WARN, "Savestate is corrupted: video y is out of range");
error = true; } LOAD_16LE(ucheck16, 0, &state->memory.dmaDest); - if (ucheck16 >= GB_SIZE_OAM) { + if (ucheck16 + state->memory.dmaRemaining > GB_SIZE_OAM) { mLOG(GB_STATE, WARN, "Savestate is corrupted: DMA destination is out of range"); error = true; }