Marcus Meissner : programs: Fixed two RegEnumValue name lengths.

Alexandre Julliard julliard at winehq.org
Mon Oct 27 08:03:01 CDT 2008


Module: wine
Branch: master
Commit: 19464a6bf77cba2f7028ce5d90302a19ec88da1c
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=19464a6bf77cba2f7028ce5d90302a19ec88da1c

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Sun Oct 26 15:27:05 2008 +0100

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 531591b..3e266cc 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 f1439a7..543daf1 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  */




More information about the wine-cvs mailing list