From 3691f023593fb99edf944f2bb2530de443c7e524 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 17 Nov 2024 13:53:34 +0300 Subject: [PATCH] public: crtlib: make Q_strchrnul return non-const pointer, like strchr --- public/crtlib.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/crtlib.h b/public/crtlib.h index 3fdda4a1..5ea2b48b 100644 --- a/public/crtlib.h +++ b/public/crtlib.h @@ -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