Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Win10's GetUserProfileDirectory() problem in stable-2.0 branch.
  • Loading branch information
icculus committed Oct 4, 2018
1 parent 8d62a2c commit 4344c4f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions platform/windows.c
Expand Up @@ -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;

Expand All @@ -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;

Expand Down

0 comments on commit 4344c4f

Please sign in to comment.