Thou shalt not use strnicmp.
Thou shalt use strncasecmp. Fix compilation on !MSC.
This commit is contained in:
parent
dcfe3bad86
commit
1f279f75af
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue