summaryrefslogtreecommitdiff
path: root/src/game/g_svcmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/g_svcmds.c')
-rw-r--r--src/game/g_svcmds.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c
index c2d61ec3..b5eeda7b 100644
--- a/src/game/g_svcmds.c
+++ b/src/game/g_svcmds.c
@@ -212,6 +212,7 @@ static void Svcmd_LayoutSave_f( void )
char str2[ MAX_QPATH - 4 ];
char *s;
int i = 0;
+ qboolean pipeEncountered = qfalse;
if( trap_Argc( ) != 2 )
{
@@ -224,12 +225,17 @@ static void Svcmd_LayoutSave_f( void )
s = &str[ 0 ];
while( *s && i < sizeof( str2 ) - 1 )
{
- if( isalnum( *s ) || *s == '-' || *s == '_' )
+ if( isalnum( *s ) || *s == '-' || *s == '_' ||
+ pipeEncountered || *s == '|' )
+ {
str2[ i++ ] = *s;
+ if( *s == '|' )
+ pipeEncountered = qtrue;
+ }
s++;
}
- if( i == 0 )
+ if( i == 0 || str2[ 0 ] == '|' )
{
G_Printf( "layoutsave: invalid name \"%s\"\n", str );
return;