@@ -361,6 +361,10 @@ static bool ShellExecute(const std::string& cmd, std::string& succResult, std::s
strcat(result, buf_ps);
}
pclose(ptr);
+ const int len = strlen(result);
+ for (int i = len - 1; i >= 0 && (result[i] == '\r' || result[i] == '\n'); --i) {
+ result[i] = '\0';
+ }
succResult = result;
return true;
} else {