Commit 7a8ff7fa authored by Alexandre Julliard's avatar Alexandre Julliard

kernel32: Avoid setting an empty current directory in the process params.

parent 1a561b64
......@@ -1887,8 +1887,9 @@ static RTL_USER_PROCESS_PARAMETERS *create_process_params( LPCWSTR filename, LPC
RtlInitUnicodeString( &desktopW, startup->lpDesktop );
runtimeW.Buffer = (WCHAR *)startup->lpReserved2;
runtimeW.Length = runtimeW.MaximumLength = startup->cbReserved2;
if (RtlCreateProcessParametersEx( &params, &imageW, NULL, &curdirW, &cmdlineW, envW, &titleW,
&desktopW, NULL, &runtimeW, PROCESS_PARAMS_FLAG_NORMALIZED ))
if (RtlCreateProcessParametersEx( &params, &imageW, NULL, cur_dir ? &curdirW : NULL,
&cmdlineW, envW, &titleW, &desktopW,
NULL, &runtimeW, PROCESS_PARAMS_FLAG_NORMALIZED ))
{
if (envW != env) HeapFree( GetProcessHeap(), 0, envW );
return NULL;
......
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