mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-09 05:24:17 +00:00
Add strcasestr implementation for win32
This commit is contained in:
parent
26bec53193
commit
0f24b15364
@ -151,6 +151,23 @@ void UTIL_CoopKickPlayer(CBaseEntity *pPlayer)
|
||||
|
||||
badlist[i] = strdup( name );
|
||||
}
|
||||
#ifdef __WIN32 // no strcasestr
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
const char *strcasestr( const char *s1, const char *s2 )
|
||||
{
|
||||
if( s1 == 0 || s2 == 0 )
|
||||
return 0;
|
||||
|
||||
size_t n = strlen(s2);
|
||||
|
||||
while(*s1)
|
||||
if(!strnicmp(s1++,s2,n))
|
||||
return (s1-1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool UTIL_CoopIsBadPlayer( CBaseEntity *plr )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user