winmm: RegQueryValueExW wants the size in bytes, not the size in characters.

Signed-off-by: Carlo Bramini <carlo_bramini@users.sourceforge.net>
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Carlo Bramini 2017-02-12 14:00:47 +01:00 committed by Alexandre Julliard
parent 77af98e3df
commit 1cc27eba14
1 changed files with 1 additions and 1 deletions

View File

@ -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;