client: If CreateProcess succeeds, the return value is nonzero

It is not correct to compare CreateProcess result with TRUE value.
Docs say for success return value is nonzero, not only TRUE.
This commit is contained in:
Dmitry Tsarevich 2020-05-07 14:12:48 +03:00
parent 0310960571
commit 471114fd5a
No known key found for this signature in database
GPG Key ID: E3C61298FF5B1274
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ bool CreateWslProcess(const std::string& wsl_app, const std::string& command, HA
const std::string cmd = wsl_app + " " + command;
const bool res = (CreateProcess(NULL, (LPSTR)cmd.c_str(), NULL, NULL, TRUE, dwFlags, NULL, NULL, &si, &pi) == TRUE);
const bool res = (CreateProcess(NULL, (LPSTR)cmd.c_str(), NULL, NULL, TRUE, dwFlags, NULL, NULL, &si, &pi) != FALSE);
if (res) {
handle = pi.hProcess;