diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/g_svcmds.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/g_svcmds.c b/src/game/g_svcmds.c index 72d26478..ae67e291 100644 --- a/src/game/g_svcmds.c +++ b/src/game/g_svcmds.c @@ -222,19 +222,18 @@ static void Svcmd_LayoutSave_f( void ) while( *s && i < sizeof( str2 ) - 1 ) { if( isalnum( *s ) || *s == '-' || *s == '_' ) - { str2[ i++ ] = *s; - str2[ i ] = '\0'; - } s++; } - if( !str2[ 0 ] ) + if( i == 0 ) { G_Printf( "layoutsave: invalid name \"%s\"\n", str ); return; } + str2[ i ] = '\0'; + G_LayoutSave( str2 ); } |