diff options
Diffstat (limited to 'src/qcommon/q_shared.c')
-rw-r--r-- | src/qcommon/q_shared.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/qcommon/q_shared.c b/src/qcommon/q_shared.c index fc259219..07e3669c 100644 --- a/src/qcommon/q_shared.c +++ b/src/qcommon/q_shared.c @@ -1234,12 +1234,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; } |