diff options
Diffstat (limited to 'src/utils/process.cpp')
-rw-r--r-- | src/utils/process.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/process.cpp b/src/utils/process.cpp index bba018195..b24949cfe 100644 --- a/src/utils/process.cpp +++ b/src/utils/process.cpp @@ -51,9 +51,9 @@ int execFileWait(std::string pathName, std::string name A_UNUSED, memset(&piProcessInfo, 0, sizeof(piProcessInfo)); siStartupInfo.cb = sizeof(siStartupInfo); DWORD ret = -1; - std::string args(pathName + " " + arg1); + std::string args(std::string(pathName).append(" ").append(arg1)); if (!arg2.empty()) - args += " " + arg2; + args.append(" ").append(arg2); if (CreateProcess(pathName.c_str(), (char*)args.c_str(), nullptr, nullptr, false, CREATE_DEFAULT_ERROR_MODE, nullptr, nullptr, &siStartupInfo, @@ -84,9 +84,9 @@ bool execFile(std::string pathName, std::string name A_UNUSED, memset(&siStartupInfo, 0, sizeof(siStartupInfo)); memset(&piProcessInfo, 0, sizeof(piProcessInfo)); siStartupInfo.cb = sizeof(siStartupInfo); - std::string args(pathName + " " + arg1); + std::string args(std::string(pathName).append(" ").append(arg1)); if (!arg2.empty()) - args += " " + arg2; + args.append(" ").append(arg2); bool res = CreateProcess(pathName.c_str(), const_cast<char*>( args.c_str()), nullptr, nullptr, false, |