Stricter Info_Validate

This commit is contained in:
Tim Angus committed 2025-10-17 14:20:53 +01:00
1 parent 2bf82f1aba
commit a6f949c8a6
1 file changed
+15 -5
+15 -5
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;
}