Skip to content

Commit

Permalink
fix(fs.c, windows, ucrt64): use GetCurrentDirectoryW instead of _wget…
Browse files Browse the repository at this point in the history
…cwd on windows to fix compilation on msys ucrt64

Signed-off-by: NaitLee <[email protected]>
  • Loading branch information
NaitLee authored and divVerent committed Oct 25, 2024
1 parent cc72b92 commit e80bb97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@

// windows wchar helpers
#ifdef WIN32
# define MAX_OSWPATH (MAX_OSPATH * sizeof(wchar))
# define MAX_OSWPATH MAX_OSPATH
# define WPATHDEF(var) wchar var[MAX_OSWPATH]
#else
# define WPATHDEF(var) ;
Expand Down Expand Up @@ -2197,7 +2197,7 @@ static void FS_Init_Dir (void)
#else
// use the working directory
#ifdef WIN32
_wgetcwd(fs_basedirw, sizeof(fs_basedirw));
GetCurrentDirectoryW(sizeof(fs_basedirw), fs_basedirw);
NARROW(fs_basedirw, fs_basedir);
#else
getcwd(fs_basedir, sizeof(fs_basedir));
Expand Down

0 comments on commit e80bb97

Please sign in to comment.