From 4344c4fd60de364df249417d44cd940ed5e609a8 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 3 Oct 2018 22:44:29 -0400 Subject: [PATCH] Fix Win10's GetUserProfileDirectory() problem in stable-2.0 branch. --- platform/windows.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/windows.c b/platform/windows.c index 2ced9a4a..bc1709fe 100644 --- a/platform/windows.c +++ b/platform/windows.c @@ -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;