Fix Win10's GetUserProfileDirectory() problem in stable-2.0 branch.

This commit is contained in:
Ryan C. Gordon 2018-10-03 22:44:29 -04:00
parent 8d62a2c7e1
commit 4344c4fd60
1 changed files with 1 additions and 2 deletions

View File

@ -451,7 +451,6 @@ static int determineUserDir(void)
if (OpenProcessToken(processHandle, TOKEN_QUERY, &accessToken))
{
DWORD psize = 0;
WCHAR dummy = 0;
LPWSTR wstr = NULL;
BOOL rc = 0;
@ -460,7 +459,7 @@ static int determineUserDir(void)
* psize. Also note that the second parameter can't be
* NULL or the function fails.
*/
rc = pGetUserProfileDirectoryW(accessToken, &dummy, &psize);
rc = pGetUserProfileDirectoryW(accessToken, NULL, &psize);
assert(!rc); /* !!! FIXME: handle this gracefully. */
(void)rc;