mirror of
https://github.com/reactos/reactos.git
synced 2024-09-10 12:54:51 +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();
|
dwError = GetLastError();
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
expanded = HeapAlloc(GetProcessHeap(), 0, dwSizeNeeded);
|
expanded = HeapAlloc(GetProcessHeap(), 0, dwSizeNeeded * sizeof(WCHAR));
|
||||||
if (dwSizeNeeded < ExpandEnvironmentStringsW((LPCWSTR)ptr, expanded, dwSizeNeeded))
|
if (dwSizeNeeded < ExpandEnvironmentStringsW((LPCWSTR)ptr, expanded, dwSizeNeeded))
|
||||||
{
|
{
|
||||||
dwError = GetLastError();
|
dwError = GetLastError();
|
||||||
|
|
Loading…
Reference in a new issue