start.exe: Put double quotes around arguments with spaces.
This commit is contained in:
parent
5db70db76e
commit
30a22664e6
|
@ -107,12 +107,21 @@ static char *build_args( int argc, char **argv )
|
|||
char *ret, *p;
|
||||
|
||||
for (i = 0; i < argc; i++ )
|
||||
{
|
||||
len += strlen(argv[i]) + 1;
|
||||
if (strchr(argv[i], ' '))
|
||||
len += 2;
|
||||
}
|
||||
ret = HeapAlloc( GetProcessHeap(), 0, len );
|
||||
ret[0] = 0;
|
||||
|
||||
for (i = 0, p = ret; i < argc; i++ )
|
||||
{
|
||||
if (strchr(argv[i], ' '))
|
||||
p += sprintf(p, " \"%s\"", argv[i]);
|
||||
else
|
||||
p += sprintf(p, " %s", argv[i]);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue