mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[CMD]
Fix first argument of the target program so that paths with spaces aren't reparsed by the c runtime as multiple arguments. svn path=/trunk/; revision=56716
This commit is contained in:
@@ -396,7 +396,10 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
|
||||
STARTUPINFO stui;
|
||||
|
||||
/* build command line for CreateProcess(): FullName + " " + rest */
|
||||
_tcscpy(szFullCmdLine, szFullName);
|
||||
BOOL quoted = !!_tcschr(First, ' ');
|
||||
_tcscpy(szFullCmdLine, quoted ? _T("\"") : _T(""));
|
||||
_tcsncat(szFullCmdLine, First, CMDLINE_LENGTH - _tcslen(szFullCmdLine));
|
||||
_tcsncat(szFullCmdLine, quoted ? _T("\"") : _T(""), CMDLINE_LENGTH - _tcslen(szFullCmdLine));
|
||||
|
||||
if (*rest)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user