kernel32: Ignore empty environment values from registry.

This commit is contained in:
Andrew Nguyen 2009-12-23 11:31:52 -06:00 committed by Alexandre Julliard
parent 542feda6b8
commit 9294882b94
1 changed files with 1 additions and 0 deletions

View File

@ -378,6 +378,7 @@ static void set_registry_variables( HANDLE hkey, ULONG type )
env_value.Length = env_value.MaximumLength = info->DataLength;
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 */
if (!env_value.Length) continue;
if (info->Type == REG_EXPAND_SZ)
{
WCHAR buf_expanded[1024];