From d2bc98bb5aadf2c89495d3c726390226e465dfda Mon Sep 17 00:00:00 2001 From: kervala Date: Tue, 2 Feb 2016 19:20:02 +0100 Subject: [PATCH] Fixed: Async execution of .bat under Windows --- code/nel/src/misc/common.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/nel/src/misc/common.cpp b/code/nel/src/misc/common.cpp index 119323331..20e03f438 100644 --- a/code/nel/src/misc/common.cpp +++ b/code/nel/src/misc/common.cpp @@ -732,8 +732,7 @@ bool launchProgram(const std::string &programName, const std::string &arguments, SetEnvironmentVariable( SE_TRANSLATOR_IN_MAIN_MODULE, NULL ); } - string arg = " " + arguments; - BOOL res = CreateProcessA(programName.c_str(), (char*)arg.c_str(), NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE | CREATE_NO_WINDOW, NULL, NULL, &si, &pi); + BOOL res = CreateProcessA(programName.empty() ? NULL:programName.c_str(), (char*)arguments.c_str(), NULL, NULL, FALSE, CREATE_DEFAULT_ERROR_MODE | CREATE_NO_WINDOW, NULL, NULL, &si, &pi); if (res) {