programs: Fixed two RegEnumValue name lengths.

This commit is contained in:
Marcus Meissner 2008-10-26 15:27:05 +01:00 committed by Alexandre Julliard
parent 0025eaefab
commit 19464a6bf7
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
while(TRUE)
{
lenName = sizeof(WCHAR[MAX_LOAD_STRING]);
lenName = sizeof(WCHAR[MAX_LOAD_STRING])/sizeof(WCHAR);
lenData = sizeof(WCHAR[MAX_LOAD_STRING]);
retEnum = RegEnumValue(hKey, i, wszName, &lenName,

View File

@ -491,7 +491,7 @@ WCHAR **enumerate_valuesW(HKEY root, WCHAR *path)
while (TRUE)
{
WCHAR name[1024];
DWORD namesize = sizeof(name);
DWORD namesize = sizeof(name)/sizeof(name[0]);
BOOL removed = FALSE;
/* find out the needed size, allocate a buffer, read the value */