public: explicitly cast chars to bytes in ctype functions

This commit is contained in:
Alibek Omarov
2026-04-28 09:49:32 +05:00
parent f91e5a7647
commit ec8059173d
2 changed files with 10 additions and 4 deletions

View File

@@ -929,12 +929,12 @@ void COM_TrimSpace( char *dst, const char *src, size_t size )
return;
// remove spaces from the start
for( ; *src && isspace( *src ); src++ );
for( ; *src && isspace((byte)*src ); src++ );
int len = Q_strlen( src );
// remove spaces from the end
for( ; len > 0 && isspace( src[len - 1] ); len-- );
for( ; len > 0 && isspace((byte)src[len - 1] ); len-- );
if( len > 0 )
{