services.exe[2/8]: load services list from registry
Alexandre Julliard
julliard at winehq.org
Wed Sep 26 07:01:34 CDT 2007
"Mikolaj Zalewski" <mikolajz at google.com> writes:
> + buf = HeapAlloc(GetProcessHeap(), 0, size + 4);
> + if ((err = RegQueryValueExW(hKey, szValue, 0, &type, (LPBYTE)buf, &size)) != 0)
> + goto failed;
> + buf[size/2] = 0;
> + buf[size/2 + 1] = 0;
Please use sizeof(WCHAR) instead of hardcoding values like 2 and 4.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list