2
0
mirror of https://github.com/FWGS/xash3d-fwgs synced 2024-11-22 09:56:22 +01:00

public: crtlib: make Q_strchrnul return non-const pointer, like strchr

This commit is contained in:
Alibek Omarov 2024-11-17 13:53:34 +03:00
parent 622d88eeba
commit 3691f02359

View File

@ -276,11 +276,11 @@ char *Q_stristr( const char *s1, const char *s2 );
#if HAVE_STRCHRNUL
#define Q_strchrnul strchrnul
#else // !HAVE_STRCHRNUL
static inline const char *Q_strchrnul( const char *s, int c )
static inline char *Q_strchrnul( const char *s, int c )
{
const char *p = Q_strchr( s, c );
char *p = (char *)Q_strchr( s, c );
if( p ) return p;
return s + Q_strlen( s );
return (char *)s + Q_strlen( s );
}
#endif // !HAVE_STRCHRNUL