From a0342db150f83e8872c14f2a8eff43281b9f9426 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Wed, 12 Aug 2020 00:34:11 -0700 Subject: [PATCH] GBA: Disable more checks when loading GS save with checks disabled (fixes #1851) --- CHANGES | 1 + src/gba/sharkport.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 731425e6d..55d501856 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ Other fixes: - 3DS: Redo video sync to be more precise - 3DS: Fix crash with libctru 2.0 when exiting - Core: Fix reported ROM size when a fixed buffer size is used + - GBA: Disable more checks when loading GS save with checks disabled (fixes mgba.io/i/1851) - Qt: Add dummy English translation file (fixes mgba.io/i/1469) - mGUI: Fix closing down a game if an exit is signalled - mVL: Fix injecting accidentally draining non-injection buffer diff --git a/src/gba/sharkport.c b/src/gba/sharkport.c index ee717bdee..de8ccd4d4 100644 --- a/src/gba/sharkport.c +++ b/src/gba/sharkport.c @@ -91,7 +91,7 @@ bool GBASavedataImportSharkPort(struct GBA* gba, struct VFile* vf, bool testChec buffer.c[0x19] = 0; buffer.c[0x1A] = 0; buffer.c[0x1B] = 0; - if (memcmp(buffer.c, payload, 0x1C) != 0) { + if (memcmp(buffer.c, payload, testChecksum ? 0x1C : 0xF) != 0) { goto cleanup; }