From 2e7f6bd52a63916a06bc19b7131e1caed6fc62af Mon Sep 17 00:00:00 2001 From: zeromus Date: Thu, 4 Nov 2010 09:44:52 +0000 Subject: [PATCH] try rewriting part of the AR parser a little differently to see if it will trick vs2010 into working --- desmume/src/cheatSystem.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/desmume/src/cheatSystem.cpp b/desmume/src/cheatSystem.cpp index a20de2cf3..66887a8f8 100644 --- a/desmume/src/cheatSystem.cpp +++ b/desmume/src/cheatSystem.cpp @@ -420,11 +420,11 @@ BOOL CHEATS::XXcodePreParser(CHEATS_LIST *list, char *code) count = (strlen(tmp_buf) / 16); for (int i=0; i < count; i++) { - char buf[8] = {0}; - strncpy(buf, tmp_buf+(i*16), 8); - sscanf_s(buf, "%x", &list->code[i][0]); - strncpy(buf, tmp_buf+(i*16) + 8, 8); - sscanf_s(buf, "%x", &list->code[i][1]); + char buf[9] = {0}; + memcpy(buf, tmp_buf+(i*16), 8); + sscanf(buf, "%x", &list->code[i][0]); + memcpy(buf, tmp_buf+(i*16) + 8, 8); + sscanf(buf, "%x", &list->code[i][1]); } list->num = count;