From: NaitLee Date: Fri, 25 Oct 2024 13:21:38 +0000 (+0800) Subject: fix(fs.c, win32): correct nBufferLength parameter for GetCurrentDirectoryW X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ef5f75a12d48ca661b9b42fd8fe3420d1737987a;p=xonotic%2Fdarkplaces.git fix(fs.c, win32): correct nBufferLength parameter for GetCurrentDirectoryW --- diff --git a/fs.c b/fs.c index e912fa47..72fc0056 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));