mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 01:45:19 +01:00
public: crtlib: make Q_strchrnul return non-const pointer, like strchr
This commit is contained in:
parent
622d88eeba
commit
3691f02359
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user