diff --git a/CHANGES b/CHANGES index a8b304ad2..1fd0ea2e9 100644 --- a/CHANGES +++ b/CHANGES @@ -8,6 +8,7 @@ Other fixes: - Core: Fix crashes if core directories aren't set - Qt: Cap audio buffer size to 8192 (fixes mgba.io/i/1433) - Core: Fix crash when exiting game with cheats loaded + - GBA Cheats: Fix PARv3 Thumb hooks Misc: - Qt: Make mute menu option also toggle fast-forward mute (fixes mgba.io/i/1424) diff --git a/src/gba/cheats/parv3.c b/src/gba/cheats/parv3.c index 0d74aaed4..4f3a89310 100644 --- a/src/gba/cheats/parv3.c +++ b/src/gba/cheats/parv3.c @@ -284,7 +284,7 @@ bool GBACheatAddProActionReplayRaw(struct GBACheatSet* cheats, uint32_t op1, uin return false; } cheats->hook = malloc(sizeof(*cheats->hook)); - cheats->hook->address = BASE_CART0 | (op1 & (SIZE_CART0 - 1)); + cheats->hook->address = BASE_CART0 | (op1 & (SIZE_CART0 - 2)); cheats->hook->mode = MODE_THUMB; cheats->hook->refs = 1; cheats->hook->reentries = 0;