From ef5f75a12d48ca661b9b42fd8fe3420d1737987a Mon Sep 17 00:00:00 2001 From: NaitLee Date: Fri, 25 Oct 2024 21:21:38 +0800 Subject: [PATCH] fix(fs.c, win32): correct nBufferLength parameter for GetCurrentDirectoryW --- fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs.c b/fs.c index e912fa479..72fc0056e 100644 --- a/fs.c +++ b/fs.c @@ -2197,7 +2197,7 @@ static void FS_Init_Dir (void) #else // use the working directory #ifdef WIN32 - GetCurrentDirectoryW(sizeof(fs_basedirw), fs_basedirw); + GetCurrentDirectoryW(sizeof(fs_basedirw) / sizeof(*fs_basedirw), fs_basedirw); NARROW(fs_basedirw, fs_basedir); #else getcwd(fs_basedir, sizeof(fs_basedir));