From 1cc27eba14375564228d2d9db8fdd1073997928e Mon Sep 17 00:00:00 2001 From: Carlo Bramini Date: Sun, 12 Feb 2017 14:00:47 +0100 Subject: [PATCH] winmm: RegQueryValueExW wants the size in bytes, not the size in characters. Signed-off-by: Carlo Bramini Signed-off-by: Andrew Eikum Signed-off-by: Alexandre Julliard --- 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 5d9aed0a70a..6525db5c193 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;