diff --git a/desmume/src/cheatSystem.cpp b/desmume/src/cheatSystem.cpp index 530ed7fe3..0a4c6731b 100644 --- a/desmume/src/cheatSystem.cpp +++ b/desmume/src/cheatSystem.cpp @@ -621,8 +621,8 @@ BOOL CHEATS::load() } trim(buf); if ((strlen(buf) == 0) || (buf[0] == ';')) continue; - if(!strnicmp(buf,"name=",5)) continue; - if(!strnicmp(buf,"serial=",7)) continue; + if(!strncasecmp(buf,"name=",5)) continue; + if(!strncasecmp(buf,"serial=",7)) continue; memset(&tmp_cht, 0, sizeof(tmp_cht)); if ((buf[0] == 'D') && (buf[1] == 'S')) // internal diff --git a/desmume/src/types.h b/desmume/src/types.h index 1e9a2db84..7635bb275 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -86,6 +86,7 @@ #ifdef _MSC_VER #define strcasecmp(x,y) _stricmp(x,y) +#define strncasecmp(x, y, l) strnicmp(x, y, l) #define snprintf _snprintf #else #define WINAPI