diff --git a/src/common/file_util.cpp b/src/common/file_util.cpp index e5f8eb899..62a9a5b95 100644 --- a/src/common/file_util.cpp +++ b/src/common/file_util.cpp @@ -543,11 +543,12 @@ std::string GetCurrentDir() { // Get the current working directory (getcwd uses malloc) #ifdef _WIN32 wchar_t* dir; - if (!(dir = _wgetcwd(nullptr, 0))) { + if (!(dir = _wgetcwd(nullptr, 0))) #else char* dir; - if (!(dir = getcwd(nullptr, 0))) { + if (!(dir = getcwd(nullptr, 0))) #endif + { LOG_ERROR(Common_Filesystem, "GetCurrentDirectory failed: {}", GetLastErrorMsg()); return nullptr; }