Commit 009a0ff95f658766d73d435b7a39c8355be40d55

pionere 2022-04-12T14:33:12

use explicit GetModuleFileNameW

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/filesystem/windows/SDL_sysfilesystem.c b/src/filesystem/windows/SDL_sysfilesystem.c
index d2f6185..b57546c 100644
--- a/src/filesystem/windows/SDL_sysfilesystem.c
+++ b/src/filesystem/windows/SDL_sysfilesystem.c
@@ -51,7 +51,7 @@ SDL_GetBasePath(void)
 
         path = (WCHAR *) ptr;
 
-        len = GetModuleFileName(NULL, path, buflen);
+        len = GetModuleFileNameW(NULL, path, buflen);
         /* if it truncated, then len >= buflen - 1 */
         /* if there was enough room (or failure), len < buflen - 1 */
         if (len < buflen - 1) {