Commit aa23b0bd authored by Ulrich Weigand's avatar Ulrich Weigand Committed by Alexandre Julliard

Bugfix: Allow lpCommandLine == NULL in CreateProcess().

parent 175989db
......@@ -837,14 +837,15 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
*p = '\0';
#endif
}
if (strlen(name)) {
get_executable_name(lpCommandLine, cmdline, sizeof(cmdline), &p, TRUE);
strcat(cmdline, p);
} else {
get_executable_name(lpCommandLine, name, sizeof(name), &p, TRUE);
strcpy(cmdline, name);
strcat(cmdline, p);
}
if (lpCommandLine)
if (strlen(name)) {
get_executable_name(lpCommandLine, cmdline, sizeof(cmdline), &p, TRUE);
strcat(cmdline, p);
} else {
get_executable_name(lpCommandLine, name, sizeof(name), &p, TRUE);
strcpy(cmdline, name);
strcat(cmdline, p);
}
if (!strchr(name, '\\') && !strchr(name, '.'))
strcat(name, ".exe");
......
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