From b1fbd863c5d0fc9a9d4dbf9cd7eccaa0c05c4764 Mon Sep 17 00:00:00 2001 From: rogerman Date: Sat, 21 Jan 2012 00:31:06 +0000 Subject: [PATCH] Cocoa Port: - Fixed bug where applying an internal cheat would cause the byte size to reset. --- desmume/src/cocoa/cocoa_cheat.mm | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/desmume/src/cocoa/cocoa_cheat.mm b/desmume/src/cocoa/cocoa_cheat.mm index 3b8f1b2b2..ad1dac665 100644 --- a/desmume/src/cocoa/cocoa_cheat.mm +++ b/desmume/src/cocoa/cocoa_cheat.mm @@ -486,10 +486,17 @@ static NSImage *iconCodeBreaker = nil; self.description = self.description; self.cheatType = self.cheatType; self.freezeType = self.freezeType; - self.code = self.code; - self.bytes = self.bytes; - self.memAddress = self.memAddress; - self.value = self.value; + + if (self.cheatType == CHEAT_TYPE_INTERNAL) + { + self.bytes = self.bytes; + self.memAddress = self.memAddress; + self.value = self.value; + } + else + { + self.code = self.code; + } } - (CocoaDSCheatItem *) createWorkingCopy