Skip to content

Commit

Permalink
Update condition #3 - address PR comment
Browse files Browse the repository at this point in the history
Co-authored-by: Andrey Nekrasov <yuyoyuppe@users.noreply.github.com>
  • Loading branch information
stefansjfw and yuyoyuppe authored Feb 4, 2022
1 parent de745bf commit c14ddcf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/runner/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c14ddcf

Please sign in to comment.