Skip to content

Commit

Permalink
GH-743 Fix update picker is_after logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Aug 25, 2024
1 parent 8baff22 commit 57dc0bb
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/editor/updater.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,16 @@ bool OrchestratorVersion::is_after(const OrchestratorVersion& p_other) const
if (major == p_other.major && minor == p_other.minor && patch > p_other.patch)
return true;

const int64_t build_name_index = builds.find(build.name);
const int64_t other_build_name_index = builds.find(p_other.build.name);
if (build_name_index < other_build_name_index)
return false;
if (major == p_other.major && minor == p_other.minor && patch == p_other.patch)
{
const int64_t build_name_index = builds.find(build.name);
const int64_t other_build_name_index = builds.find(p_other.build.name);
if (build_name_index < other_build_name_index)
return true;

if (build_name_index == other_build_name_index && build.version > p_other.build.version)
return true;
if (build_name_index == other_build_name_index && build.version > p_other.build.version)
return true;
}

return false;
}
Expand Down

0 comments on commit 57dc0bb

Please sign in to comment.