Commit 30a22664 authored by Lei Zhang's avatar Lei Zhang Committed by Alexandre Julliard

start.exe: Put double quotes around arguments with spaces.

parent 5db70db7
......@@ -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++ )
p += sprintf(p, " %s", argv[i]);
{
if (strchr(argv[i], ' '))
p += sprintf(p, " \"%s\"", argv[i]);
else
p += sprintf(p, " %s", argv[i]);
}
return ret;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment