From 8941b4aba9ef923e21ad9d8ed370b5862c40806e Mon Sep 17 00:00:00 2001 From: riccardom Date: Sun, 20 Dec 2009 14:43:30 +0000 Subject: [PATCH] Add missing header for memset and declare strings as const char. --- desmume/src/cheatSystem.cpp | 6 +++--- desmume/src/cheatSystem.h | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/desmume/src/cheatSystem.cpp b/desmume/src/cheatSystem.cpp index d8e0c2cd6..409306651 100644 --- a/desmume/src/cheatSystem.cpp +++ b/desmume/src/cheatSystem.cpp @@ -536,9 +536,9 @@ u32 CHEATS::getSize() BOOL CHEATS::save() { - char *types[] = {"DS", "AR", "CB"}; - char buf[sizeof(list[0].code) * 2 + 200] = { 0 }; - FILE *flist = fopen((char *)filename, "w"); + const char *types[] = {"DS", "AR", "CB"}; + char buf[sizeof(list[0].code) * 2 + 200] = { 0 }; + FILE *flist = fopen((char *)filename, "w"); if (flist) { diff --git a/desmume/src/cheatSystem.h b/desmume/src/cheatSystem.h index 0dcaddf8a..58f8ee598 100644 --- a/desmume/src/cheatSystem.h +++ b/desmume/src/cheatSystem.h @@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include #include "common.h" #define CHEAT_VERSION_MAJOR 2