all repos — mgba @ 65de1caa0cb0f78910eb12edb9d0bfb3d8bd556f

mGBA Game Boy Advance Emulator

GB Deserialize: Fix DMA check
Jeffrey Pfau jeffrey@endrift.com
Mon, 12 Sep 2016 20:02:58 -0700
commit

65de1caa0cb0f78910eb12edb9d0bfb3d8bd556f

parent

ff788a017c4daeab34156bc0ea30cbd71b6a74b1

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

jump to
M src/gb/serialize.csrc/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; }