From 19464a6bf77cba2f7028ce5d90302a19ec88da1c Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 26 Oct 2008 15:27:05 +0100 Subject: [PATCH] programs: Fixed two RegEnumValue name lengths. --- programs/oleview/details.c | 2 +- programs/winecfg/winecfg.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/programs/oleview/details.c b/programs/oleview/details.c index 531591b39f..3e266cc3d8 100644 --- a/programs/oleview/details.c +++ b/programs/oleview/details.c @@ -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, diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c index f1439a7f9b..543daf1d85 100644 --- a/programs/winecfg/winecfg.c +++ b/programs/winecfg/winecfg.c @@ -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 */