Don't strip trailing spaces from the command line
authorColin Finck <colin@reactos.org>
Mon, 12 May 2008 21:26:38 +0000 (21:26 +0000)
committerColin Finck <colin@reactos.org>
Mon, 12 May 2008 21:26:38 +0000 (21:26 +0000)
This way, stuff like "notepad abc.txt  " will correctly pass "abc.txt  " as the filename like Windows does.

See issue #1818 for more details.

svn path=/trunk/; revision=33487

reactos/base/shell/cmd/cmd.c

index 853e5d1..3b310b1 100644 (file)
@@ -1529,11 +1529,6 @@ ProcessInput (BOOL bFlag)
 
                *cp = _T('\0');
 
 
                *cp = _T('\0');
 
-               /* strip trailing spaces */
-               while ((--cp >= commandline) && _istspace (*cp));
-
-               *(cp + 1) = _T('\0');
-
                /* JPP 19980807 */
                /* Echo batch file line */
                if (bEchoThisLine)
                /* JPP 19980807 */
                /* Echo batch file line */
                if (bEchoThisLine)