From 7becd31bfe9ba0cd77ed9dc034563e0ab513a8c9 Mon Sep 17 00:00:00 2001 From: João Silva Date: Sat, 26 Aug 2017 00:26:09 +0100 Subject: Still cleaning things up... --- source/cheats2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/cheats2.c') diff --git a/source/cheats2.c b/source/cheats2.c index cc303b8..067a929 100644 --- a/source/cheats2.c +++ b/source/cheats2.c @@ -81,7 +81,7 @@ void S9xRemoveCheat(uint32_t which1) uint8_t* ptr = Memory.Map [block]; if (ptr >= (uint8_t*) MAP_LAST) - *(ptr + (address & 0xffff)) = Cheat.c [which1].saved_byte; + ptr[address & 0xffff] = Cheat.c [which1].saved_byte; else S9xSetByte(Cheat.c [which1].saved_byte, address); /* Unsave the address for the next call to S9xRemoveCheat. */ @@ -102,7 +102,7 @@ void S9xApplyCheat(uint32_t which1) ptr = Memory.Map [block]; if (ptr >= (uint8_t*) MAP_LAST) - *(ptr + (address & 0xffff)) = Cheat.c [which1].byte; + ptr[address & 0xffff] = Cheat.c [which1].byte; else S9xSetByte(Cheat.c [which1].byte, address); Cheat.c [which1].saved = true; -- cgit v1.2.3