advapi32: RegGetValueW() must return the required buffer size in bytes, not WCHARs.

This commit is contained in:
Francois Gouget 2008-01-11 09:52:05 +01:00 committed by Alexandre Julliard
parent c47c6483aa
commit d9a06b236a

View file

@ -1504,7 +1504,7 @@ LSTATUS WINAPI RegGetValueW( HKEY hKey, LPCWSTR pszSubKey, LPCWSTR pszValue,
if (dwType == REG_EXPAND_SZ)
{
cbData = ExpandEnvironmentStringsW(pvBuf, pvData,
pcbData ? *pcbData : 0);
pcbData ? *pcbData : 0) * sizeof(WCHAR);
dwType = REG_SZ;
if(pvData && pcbData && cbData > *pcbData)
ret = ERROR_MORE_DATA;