Module: wine Branch: master Commit: 1cc27eba14375564228d2d9db8fdd1073997928e URL: http://source.winehq.org/git/wine.git/?a=commit;h=1cc27eba14375564228d2d9db8... Author: Carlo Bramini <carlo.bramix(a)libero.it> Date: Sun Feb 12 14:00:47 2017 +0100 winmm: RegQueryValueExW wants the size in bytes, not the size in characters. Signed-off-by: Carlo Bramini <carlo_bramini(a)users.sourceforge.net> Signed-off-by: Andrew Eikum <aeikum(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/winmm/playsound.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/winmm/playsound.c b/dlls/winmm/playsound.c index 5d9aed0..6525db5 100644 --- a/dlls/winmm/playsound.c +++ b/dlls/winmm/playsound.c @@ -140,7 +140,7 @@ static HMMIO get_mmioFromProfile(UINT uFlags, LPCWSTR lpszName) if (err != 0) goto none; } - count = sizeof(str)/sizeof(str[0]); + count = sizeof(str); err = RegQueryValueExW(hSnd, NULL, 0, &type, (LPBYTE)str, &count); RegCloseKey(hSnd); if (err != 0 || !*str) goto none;