From d6fab7c7384b100b4e3a6d3554285b9b862d93a5 Mon Sep 17 00:00:00 2001 From: shweet Date: Thu, 18 Dec 2025 01:23:41 -0500 Subject: [PATCH] bbbbbbbb --- src/render.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/render.cpp b/src/render.cpp index 007d0b3..30bc11e 100644 --- a/src/render.cpp +++ b/src/render.cpp @@ -116,8 +116,18 @@ namespace anm2ed command += " 2>&1"; #if _WIN32 - command = "powershell -Command '& " + command + " | Tee-Object -FilePath " + - string::quote(ffmpegTempPathString) + " -Append'"; + auto script = std::string("& ") + command + " | Tee-Object -FilePath " + string::quote(ffmpegTempPathString) + + " -Append"; + auto scriptEscaped = std::string(); + scriptEscaped.reserve(script.size() * 2); + for (auto character : script) + { + if (character == '"') + scriptEscaped += "\"\""; + else + scriptEscaped += character; + } + command = "powershell -Command \"" + scriptEscaped + "\""; #else command += " | tee -a " + string::quote(loggerPathString); #endif