From dcfe3bad863ee387cc696a6e49a1bb87ecde7e0f Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 18 Jul 2010 07:01:28 +0000 Subject: [PATCH] what about AR he says --- desmume/src/cheatSystem.cpp | 5 ++++- desmume/src/common.cpp | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/desmume/src/cheatSystem.cpp b/desmume/src/cheatSystem.cpp index ed0e3bf92..530ed7fe3 100644 --- a/desmume/src/cheatSystem.cpp +++ b/desmume/src/cheatSystem.cpp @@ -425,7 +425,10 @@ BOOL CHEATS::add_AR(char *code, char *description, BOOL enabled) //if (num == MAX_CHEAT_LIST) return FALSE; size_t num = list.size(); - if (!XXcodePreParser(&list[num], code)) return FALSE; + CHEATS_LIST temp; + if (!XXcodePreParser(&temp, code)) return FALSE; + + list.push_back(temp); list[num].type = 1; diff --git a/desmume/src/common.cpp b/desmume/src/common.cpp index 3399f0fe8..01c3fa15a 100644 --- a/desmume/src/common.cpp +++ b/desmume/src/common.cpp @@ -59,7 +59,7 @@ char *removeSpecialChars(char *s) for (u32 i = 0; i < strlen(s); i++) { - if (isspace(s[i]) && (s[i] != 0x20)) + if (isspace((u8)s[i]) && (s[i] != 0x20)) *buf = 0x20; else *buf = s[i];