Thou shalt not use strnicmp.

Thou shalt use strncasecmp.

Fix compilation on !MSC.
This commit is contained in:
riccardom 2010-07-18 08:51:51 +00:00
parent dcfe3bad86
commit 1f279f75af
2 changed files with 3 additions and 2 deletions

View File

@ -621,8 +621,8 @@ BOOL CHEATS::load()
} }
trim(buf); trim(buf);
if ((strlen(buf) == 0) || (buf[0] == ';')) continue; if ((strlen(buf) == 0) || (buf[0] == ';')) continue;
if(!strnicmp(buf,"name=",5)) continue; if(!strncasecmp(buf,"name=",5)) continue;
if(!strnicmp(buf,"serial=",7)) continue; if(!strncasecmp(buf,"serial=",7)) continue;
memset(&tmp_cht, 0, sizeof(tmp_cht)); memset(&tmp_cht, 0, sizeof(tmp_cht));
if ((buf[0] == 'D') && (buf[1] == 'S')) // internal if ((buf[0] == 'D') && (buf[1] == 'S')) // internal

View File

@ -86,6 +86,7 @@
#ifdef _MSC_VER #ifdef _MSC_VER
#define strcasecmp(x,y) _stricmp(x,y) #define strcasecmp(x,y) _stricmp(x,y)
#define strncasecmp(x, y, l) strnicmp(x, y, l)
#define snprintf _snprintf #define snprintf _snprintf
#else #else
#define WINAPI #define WINAPI