Commit 9e01af75 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Don't set runtime info at all if it's empty.

parent b8f6852b
......@@ -1622,12 +1622,15 @@ void init_startup_info(void)
copy_unicode_string( &src, &dst, &params->WindowTitle, info->title_len );
copy_unicode_string( &src, &dst, &params->Desktop, info->desktop_len );
copy_unicode_string( &src, &dst, &params->ShellInfo, info->shellinfo_len );
/* runtime info isn't a real string */
params->RuntimeInfo.MaximumLength = params->RuntimeInfo.Length = info->runtime_len;
params->RuntimeInfo.Buffer = dst;
memcpy( dst, src, info->runtime_len );
src += (info->runtime_len + 1) / sizeof(WCHAR);
dst += (info->runtime_len + 1) / sizeof(WCHAR);
if (info->runtime_len)
{
/* runtime info isn't a real string */
params->RuntimeInfo.MaximumLength = params->RuntimeInfo.Length = info->runtime_len;
params->RuntimeInfo.Buffer = dst;
memcpy( dst, src, info->runtime_len );
src += (info->runtime_len + 1) / sizeof(WCHAR);
dst += (info->runtime_len + 1) / sizeof(WCHAR);
}
assert( (char *)src == (char *)info + info_size );
params->Environment = dst;
......
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