From c14ddcf42671ee1b062fc4054f20af964bcad46a Mon Sep 17 00:00:00 2001 From: Stefan Markovic <57057282+stefansjfw@users.noreply.github.com> Date: Fri, 4 Feb 2022 19:02:57 +0100 Subject: [PATCH] Update condition #3 - address PR comment Co-authored-by: Andrey Nekrasov --- src/runner/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/runner/main.cpp b/src/runner/main.cpp index 8213e6cb6bb7..b0ee4496f4b2 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -389,7 +389,8 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine const bool withDontElevateArg = cmdLine.find("--dont-elevate") != std::string::npos; const bool runElevatedSetting = general_settings.GetNamedBoolean(L"run_elevated", false); - if (elevated && withDontElevateArg && runElevatedSetting == false) + if (elevated && withDontElevateArg && !runElevatedSetting) + { schedule_restart_as_non_elevated(); result = 0;