From e98560e931ba7a34251ae57a0eef0817dd8e1102 Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Fri, 2 Aug 2019 18:33:16 -0700 Subject: [PATCH] GBA Cheats: Fix value incrementing in CB slide codes (fixes #1501) --- CHANGES | 1 + src/gba/cheats/codebreaker.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index c629827e9..f45da3efc 100644 --- a/CHANGES +++ b/CHANGES @@ -19,6 +19,7 @@ Other fixes: - Libretro: Fix crash changing allowing opposing directions (hhromic) - Qt: Fix race conditions initializing GDB stub - GBA: Set up GPIO mapping on null and ELF ROM regions (fixes mgba.io/i/1481) + - GBA Cheats: Fix value incrementing in CB slide codes (fixes mgba.io/i/1501) Misc: - Qt: Make mute menu option also toggle fast-forward mute (fixes mgba.io/i/1424) - Qt: Show error message if file failed to load diff --git a/src/gba/cheats/codebreaker.c b/src/gba/cheats/codebreaker.c index bca859b68..0ba5c80ea 100644 --- a/src/gba/cheats/codebreaker.c +++ b/src/gba/cheats/codebreaker.c @@ -201,7 +201,7 @@ bool GBACheatAddCodeBreaker(struct GBACheatSet* cheats, uint32_t op1, uint16_t o struct mCheat* incompleteCheat = mCheatListGetPointer(&cheats->d.list, cheats->incompleteCheat); incompleteCheat->repeat = op1 & 0xFFFF; incompleteCheat->addressOffset = op2; - incompleteCheat->operandOffset = 0; + incompleteCheat->operandOffset = op1 >> 16; cheats->incompleteCheat = COMPLETE; return true; }