Bugfix: Allow lpCommandLine == NULL in CreateProcess().
This commit is contained in:
parent
175989dbd4
commit
aa23b0bd63
|
@ -837,14 +837,15 @@ BOOL WINAPI CreateProcessA( LPCSTR lpApplicationName, LPSTR lpCommandLine,
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (strlen(name)) {
|
if (lpCommandLine)
|
||||||
get_executable_name(lpCommandLine, cmdline, sizeof(cmdline), &p, TRUE);
|
if (strlen(name)) {
|
||||||
strcat(cmdline, p);
|
get_executable_name(lpCommandLine, cmdline, sizeof(cmdline), &p, TRUE);
|
||||||
} else {
|
strcat(cmdline, p);
|
||||||
get_executable_name(lpCommandLine, name, sizeof(name), &p, TRUE);
|
} else {
|
||||||
strcpy(cmdline, name);
|
get_executable_name(lpCommandLine, name, sizeof(name), &p, TRUE);
|
||||||
strcat(cmdline, p);
|
strcpy(cmdline, name);
|
||||||
}
|
strcat(cmdline, p);
|
||||||
|
}
|
||||||
|
|
||||||
if (!strchr(name, '\\') && !strchr(name, '.'))
|
if (!strchr(name, '\\') && !strchr(name, '.'))
|
||||||
strcat(name, ".exe");
|
strcat(name, ".exe");
|
||||||
|
|
Loading…
Reference in New Issue