diff --git a/external/untwine/api/QgisUntwine_win.cpp b/external/untwine/api/QgisUntwine_win.cpp index c8b07e03d1f0c..61f654dabef09 100644 --- a/external/untwine/api/QgisUntwine_win.cpp +++ b/external/untwine/api/QgisUntwine_win.cpp @@ -2,6 +2,7 @@ #include #include "QgisUntwine.hpp" +#include "../untwine/Common.hpp" namespace untwine { @@ -40,9 +41,8 @@ bool QgisUntwine::start(Options& options) startupInfo.dwFlags = STARTF_USESTDHANDLES; **/ - std::vector ncCmdline(cmdline.begin(), cmdline.end()); - ncCmdline.push_back((char)0); - bool ok = CreateProcess(m_path.c_str(), ncCmdline.data(), + auto ncCmdline = untwine::toNative(cmdline); + bool ok = CreateProcess(untwine::toNative(m_path).c_str(), ncCmdline.data(), NULL, /* process attributes */ NULL, /* thread attributes */ TRUE, /* inherit handles */