From f52a2a194da6bd588532b0b11758924f70500d85 Mon Sep 17 00:00:00 2001 From: sam-astro <77079540+sam-astro@users.noreply.github.com> Date: Sat, 15 Jan 2022 22:36:31 -0500 Subject: [PATCH] Fixed issue where I only change a single instance lol --- Slang/Main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Slang/Main.cpp b/Slang/Main.cpp index 5ff092c..a44d755 100644 --- a/Slang/Main.cpp +++ b/Slang/Main.cpp @@ -645,7 +645,7 @@ int main(int argc, char* argv[]) std::wstring wide = converter.from_bytes(projectDirectory); #if defined(__unix__) - chdir(projectDirectory); + chdir(projectDirectory.c_str()); #elif defined(_MSC_VER) LPCSTR s = projectDirectory.c_str(); SetCurrentDirectory(s); @@ -672,10 +672,9 @@ int main(int argc, char* argv[]) std::wstring wide = converter.from_bytes(projectDirectory); #if defined(__unix__) - const char[] pC = projectDirectory.c_str(); - chdir(pC); + chdir(projectDirectory.c_str()); #elif defined(_MSC_VER) - LPCWSTR s = wide.c_str(); + LPCSTR s = projectDirectory.c_str(); SetCurrentDirectory(s); #endif // Get script contents