Module: wine Branch: master Commit: e4e5eda3d9afcb5360747ddd97e6bf4fdc0c1c0f URL: https://source.winehq.org/git/wine.git/?a=commit;h=e4e5eda3d9afcb5360747ddd9...
Author: Serge Gautherie winehq-git_serge_180711@gautherie.fr Date: Thu May 28 04:30:37 2020 +0200
mscoree: RegQueryValueExW() wants bytes, not chars.
Signed-off-by: Serge Gautherie winehq-git_serge_180711@gautherie.fr Signed-off-by: Esme Povirk vincent@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mscoree/metahost.c | 2 +- dlls/mscoree/mscoree_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/mscoree/metahost.c b/dlls/mscoree/metahost.c index 9a299662e3..7702994252 100644 --- a/dlls/mscoree/metahost.c +++ b/dlls/mscoree/metahost.c @@ -477,7 +477,7 @@ static BOOL get_install_root(LPWSTR install_dir) if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, dotnet_key, 0, KEY_READ, &key)) return FALSE;
- len = MAX_PATH; + len = MAX_PATH * sizeof(WCHAR); if (RegQueryValueExW(key, install_root, 0, NULL, (LPBYTE)install_dir, &len)) { RegCloseKey(key); diff --git a/dlls/mscoree/mscoree_main.c b/dlls/mscoree/mscoree_main.c index 81fe5610b7..4679d79e66 100644 --- a/dlls/mscoree/mscoree_main.c +++ b/dlls/mscoree/mscoree_main.c @@ -80,7 +80,7 @@ static BOOL get_install_root(LPWSTR install_dir) if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, dotnet_key, 0, KEY_READ, &key)) return FALSE;
- len = MAX_PATH; + len = MAX_PATH * sizeof(WCHAR); if (RegQueryValueExW(key, install_root, 0, NULL, (LPBYTE)install_dir, &len)) { RegCloseKey(key);