From 845f9319f9fed058dfd96ac2224ca9c3abcb51c1 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Thu, 16 Jan 2020 18:20:07 +0300 Subject: [PATCH] Fix getcwd usage --- src/Utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Utils.cpp b/src/Utils.cpp index 817f522..07d9e92 100755 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -33,7 +33,8 @@ void utils::Initialize() GetCurrentDirectoryW(1000, buffer); s_CurrentDir = WideToUtf(buffer); #else - s_CurrentDir = getcwd(NULL, 0); + char buffer[1000]; + s_CurrentDir = getcwd(buffer, 1000); #endif ForwardSlashify(s_CurrentDir); if (!s_CurrentDir.empty())