From 9bdfb1f34a4f512488c198555249a49f4e7c1172 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 25 Mar 2021 12:05:41 +0100 Subject: [PATCH] ntdll: Set the initial DllPath to null if it's empty. Signed-off-by: Alexandre Julliard --- dlls/ntdll/unix/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/ntdll/unix/env.c b/dlls/ntdll/unix/env.c index 256ea40cc87..2f4d988d709 100644 --- a/dlls/ntdll/unix/env.c +++ b/dlls/ntdll/unix/env.c @@ -2011,7 +2011,7 @@ void init_startup_info(void) params->CurrentDirectory.DosPath.MaximumLength = MAX_PATH * sizeof(WCHAR); dst = params->CurrentDirectory.DosPath.Buffer + MAX_PATH; - copy_unicode_string( &src, &dst, ¶ms->DllPath, info->dllpath_len ); + if (info->dllpath_len) copy_unicode_string( &src, &dst, ¶ms->DllPath, info->dllpath_len ); copy_unicode_string( &src, &dst, ¶ms->ImagePathName, info->imagepath_len ); copy_unicode_string( &src, &dst, ¶ms->CommandLine, info->cmdline_len ); copy_unicode_string( &src, &dst, ¶ms->WindowTitle, info->title_len );