kernel32: Ignore empty environment values from registry.
This commit is contained in:
parent
542feda6b8
commit
9294882b94
|
@ -378,6 +378,7 @@ static void set_registry_variables( HANDLE hkey, ULONG type )
|
||||||
env_value.Length = env_value.MaximumLength = info->DataLength;
|
env_value.Length = env_value.MaximumLength = info->DataLength;
|
||||||
if (env_value.Length && !env_value.Buffer[env_value.Length/sizeof(WCHAR)-1])
|
if (env_value.Length && !env_value.Buffer[env_value.Length/sizeof(WCHAR)-1])
|
||||||
env_value.Length -= sizeof(WCHAR); /* don't count terminating null if any */
|
env_value.Length -= sizeof(WCHAR); /* don't count terminating null if any */
|
||||||
|
if (!env_value.Length) continue;
|
||||||
if (info->Type == REG_EXPAND_SZ)
|
if (info->Type == REG_EXPAND_SZ)
|
||||||
{
|
{
|
||||||
WCHAR buf_expanded[1024];
|
WCHAR buf_expanded[1024];
|
||||||
|
|
Loading…
Reference in New Issue