diff options
Diffstat (limited to 'source/cmd.c')
-rw-r--r-- | source/cmd.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/cmd.c b/source/cmd.c index 528a3cf..0d57654 100644 --- a/source/cmd.c +++ b/source/cmd.c @@ -1036,6 +1036,15 @@ void Cmd_TokenizeString( const char *text, qboolean macroExpand ) { return; } +// strip off any trailing whitespace + while( cmd_string_len ) { + if( cmd_string[ cmd_string_len - 1 ] > ' ' ) { + break; + } + cmd_string[ cmd_string_len - 1 ] = 0; + cmd_string_len--; + } + dest = cmd_data; start = data = cmd_string; while( cmd_argc < MAX_STRING_TOKENS ) { |