From 15073ad63fbe523847695b4e4f5e1083f518ff55 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 3 Oct 2018 22:45:05 -0400 Subject: [PATCH] Fixed Win10's GetUserProfileDirectory() bug in stable-1.0 branch. --- platform/win32.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/platform/win32.c b/platform/win32.c index b0291df9..9ce9957e 100644 --- a/platform/win32.c +++ b/platform/win32.c @@ -185,7 +185,6 @@ static char *getExePath(const char *argv0) static int determineUserDir(void) { DWORD psize = 0; - char dummy[1]; BOOL rc = 0; HANDLE processHandle; /* Current process handle */ HANDLE accessToken = NULL; /* Security handle to process */ @@ -217,7 +216,7 @@ static int determineUserDir(void) * psize. Also note that the second parameter can't be * NULL or the function fails. */ - rc = GetUserProfileDirectory(accessToken, dummy, &psize); + rc = GetUserProfileDirectory(accessToken, NULL, &psize); assert(!rc); /* success?! */ /* Allocate memory for the profile directory */