Module: wine Branch: master Commit: 93d3ecb90f00093b5c6a834cb407666f05ba3d3b URL: https://gitlab.winehq.org/wine/wine/-/commit/93d3ecb90f00093b5c6a834cb407666...
Author: Davide Beatrici git@davidebeatrici.dev Date: Fri Sep 16 10:25:41 2022 +0200
winecoreaudio: Fix RegEnumKeyExW() call passing wrong unit for the buffer size.
The function takes the number of (wide) characters in input, not bytes.
---
dlls/winecoreaudio.drv/mmdevdrv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winecoreaudio.drv/mmdevdrv.c b/dlls/winecoreaudio.drv/mmdevdrv.c index da6c05bdc1f..69b61781058 100644 --- a/dlls/winecoreaudio.drv/mmdevdrv.c +++ b/dlls/winecoreaudio.drv/mmdevdrv.c @@ -388,7 +388,7 @@ static BOOL get_deviceid_by_guid(GUID *guid, DWORD *id, EDataFlow *flow) DWORD size, type; GUID reg_guid;
- key_name_size = sizeof(key_name); + key_name_size = ARRAY_SIZE(key_name); if(RegEnumKeyExW(devices_key, i++, key_name, &key_name_size, NULL, NULL, NULL, NULL) != ERROR_SUCCESS) break;