From fe2fef12529efcb242f55ff59780140a4eea8916 Mon Sep 17 00:00:00 2001 From: sezero Date: Tue, 16 Feb 2010 10:10:58 +0000 Subject: [PATCH] common.c (COM_InitArgv): remove the trailing whitespace added at the end of cmdline string only if there is one. print out the command line as an informational message. git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@19 af15c1b1-3010-417e-b628-4374ebc0bcbd --- quakespasm/Quake/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/quakespasm/Quake/common.c b/quakespasm/Quake/common.c index 687c2d63..5246d542 100644 --- a/quakespasm/Quake/common.c +++ b/quakespasm/Quake/common.c @@ -1143,7 +1143,10 @@ void COM_InitArgv (int argc, char **argv) break; } - com_cmdline[n-1] = 0; //johnfitz -- kill the trailing space + if (com_cmdline[n-1] = ' ') + com_cmdline[n-1] = 0; //johnfitz -- kill the trailing space + + Con_Printf("\nCommand line: %s",com_cmdline); safe = false;