Cheats: Fix indirect write cheats (fixes #2026)

This commit is contained in:
Vicki Pfau 2021-01-27 20:24:26 -08:00
parent 6154ed91cb
commit b1a06ed52b
2 changed files with 2 additions and 1 deletions

View File

@ -58,6 +58,7 @@ Emulation fixes:
Other fixes:
- 3DS: Fix thread cleanup
- All: Improve export headers (fixes mgba.io/i/1738)
- Cheats: Fix indirect write cheats (fixes mgba.io/i/2026)
- CMake: Fix build with downstream minizip that exports incompatible symbols
- CMake: Link with correct OpenGL library (fixes mgba.io/i/1872)
- Core: Ensure ELF regions can be written before trying

View File

@ -666,7 +666,7 @@ void mCheatRefresh(struct mCheatDevice* device, struct mCheatSet* cheats) {
break;
case CHEAT_ASSIGN_INDIRECT:
value = operand;
address = _readMem(device->p, address + cheat->addressOffset, 4);
address = _readMem(device->p, address, 4) + cheat->addressOffset;
performAssignment = true;
break;
case CHEAT_AND: