API documentation says that RegEnumKeyEx, RegEnumValue and
RegQueryInfoKey takes the size of the buffers as characters.

diff --git a/misc/registry.c b/misc/registry.c
index ccd5575..800727e 100644
--- a/misc/registry.c
+++ b/misc/registry.c
@@ -2707,14 +2707,14 @@
 	);
 	if (lpszName) {
 		lpszNameW	= (LPWSTR)xmalloc(*lpcchName*2);
-		lpcchNameW	= *lpcchName*2;
+		lpcchNameW	= *lpcchName;
 	} else {
 		lpszNameW	= NULL;
 		lpcchNameW 	= 0;
 	}
 	if (lpszClass) {
 		lpszClassW		= (LPWSTR)xmalloc(*lpcchClass*2);
-		lpcchClassW	= *lpcchClass*2;
+		lpcchClassW	= *lpcchClass;
 	} else {
 		lpszClassW	=0;
 		lpcchClassW=0;
@@ -2860,7 +2860,7 @@
 	lpszValueW = (LPWSTR)xmalloc(*lpcchValue*2);
 	if (lpbData) {
 		lpbDataW = (LPBYTE)xmalloc(*lpcbData*2);
-		lpcbDataW = *lpcbData*2;
+		lpcbDataW = *lpcbData;
 	} else
 		lpbDataW = NULL;
 
@@ -3311,14 +3311,6 @@
 	);
 	if (ret==ERROR_SUCCESS && lpszClass)
 		lstrcpyWtoA(lpszClass,lpszClassW);
-	if (lpcchClass)
-		*lpcchClass/=2;
-	if (lpcchMaxSubkey)
-		*lpcchMaxSubkey/=2;
-	if (lpcchMaxClass)
-		*lpcchMaxClass/=2;
-	if (lpcchMaxValueName)
-		*lpcchMaxValueName/=2;
 	if (lpszClassW)
 		free(lpszClassW);
 	return ret;