Stricter Info_Validate

This commit is contained in:
Tim Angus 2025-10-06 18:27:00 +01:00
parent 2bf82f1aba
commit a6f949c8a6

View File

@ -1301,12 +1301,22 @@ can mess up the server's parsing
==================
*/
qboolean Info_Validate( const char *s ) {
if ( strchr( s, '\"' ) ) {
return qfalse;
}
if ( strchr( s, ';' ) ) {
return qfalse;
const char* ch = s;
while ( *ch != '\0' )
{
if( !Q_isprint( *ch ) )
return qfalse;
if( *ch == '\"' )
return qfalse;
if( *ch == ';' )
return qfalse;
++ch;
}
return qtrue;
}