Module: wine Branch: master Commit: d9a06b236aa1f1dd20105128b0ba98013c8abc2f URL: http://source.winehq.org/git/wine.git/?a=commit;h=d9a06b236aa1f1dd20105128b0...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Jan 11 09:52:05 2008 +0100
advapi32: RegGetValueW() must return the required buffer size in bytes, not WCHARs.
---
dlls/advapi32/registry.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index dec2e4a..dda68e2 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -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;