From ea25f49c65aaf5cd4c8aa88740b51f118d5577a6 Mon Sep 17 00:00:00 2001 From: TellowKrinkle Date: Sun, 12 Dec 2021 05:21:30 -0600 Subject: [PATCH] Common: Fix GetWorkingDirectory on unix --- common/FileSystem.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/FileSystem.cpp b/common/FileSystem.cpp index bb9bb154d4..e289ba86f5 100644 --- a/common/FileSystem.cpp +++ b/common/FileSystem.cpp @@ -1557,6 +1557,7 @@ std::string FileSystem::GetWorkingDirectory() buffer.resize(buffer.size() * 2); } + buffer.resize(std::strlen(buffer.c_str())); // Remove excess nulls return buffer; }