windows: Workaround GetUserProfileDirectory's API change in Win10 build 1809. stable-3.0
authorRyan C. Gordon <icculus@icculus.org>
Wed, 03 Oct 2018 22:40:57 -0400
branchstable-3.0
changeset 1645 ece6769c0676
parent 1644 a29fef4a20fd
child 1651 c17f025e7a92
windows: Workaround GetUserProfileDirectory's API change in Win10 build 1809.
src/physfs_platform_windows.c
--- a/src/physfs_platform_windows.c	Wed May 16 19:54:51 2018 -0400
+++ b/src/physfs_platform_windows.c	Wed Oct 03 22:40:57 2018 -0400
@@ -566,7 +566,6 @@
     else
     {
         DWORD psize = 0;
-        WCHAR dummy = 0;
         LPWSTR wstr = NULL;
         BOOL rc = 0;
 
@@ -575,7 +574,7 @@
          *  psize. Also note that the second parameter can't be
          *  NULL or the function fails.
          */
-        rc = pGetDir(accessToken, &dummy, &psize);
+        rc = pGetDir(accessToken, NULL, &psize);
         GOTO_IF(rc, PHYSFS_ERR_OS_ERROR, done);  /* should have failed! */
 
         /* Allocate memory for the profile directory */