mirror of
https://github.com/reactos/reactos.git
synced 2024-07-13 16:15:05 +00:00
ExpandEnvironmentStrings returns the number of TCHARs, not bytes
svn path=/trunk/; revision=20471
This commit is contained in:
parent
21734ef15a
commit
1523f688af
|
@ -269,7 +269,7 @@ ScmReadString(HKEY hServiceKey,
|
|||
dwError = GetLastError();
|
||||
goto done;
|
||||
}
|
||||
expanded = HeapAlloc(GetProcessHeap(), 0, dwSizeNeeded);
|
||||
expanded = HeapAlloc(GetProcessHeap(), 0, dwSizeNeeded * sizeof(WCHAR));
|
||||
if (dwSizeNeeded < ExpandEnvironmentStringsW((LPCWSTR)ptr, expanded, dwSizeNeeded))
|
||||
{
|
||||
dwError = GetLastError();
|
||||
|
|
Loading…
Reference in a new issue