kernel32: Fix off by one error.

This commit is contained in:
Vitaliy Margolen 2007-04-28 15:50:22 -06:00 committed by Alexandre Julliard
parent cf1b810d74
commit 2bd4d6b180
1 changed files with 1 additions and 1 deletions

View File

@ -346,7 +346,7 @@ static void set_registry_variables( HANDLE hkey, ULONG type )
env_value.Buffer = (WCHAR *)(buffer + info->DataOffset);
env_value.Length = env_value.MaximumLength = info->DataLength;
if (env_value.Length && !env_value.Buffer[env_value.Length/sizeof(WCHAR)-1])
env_value.Length--; /* don't count terminating null if any */
env_value.Length -= sizeof(WCHAR); /* don't count terminating null if any */
if (info->Type == REG_EXPAND_SZ)
{
WCHAR buf_expanded[1024];