summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/candidates-containers.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/candidates-containers.adb b/src/candidates-containers.adb
index 64a03ca..22249d3 100644
--- a/src/candidates-containers.adb
+++ b/src/candidates-containers.adb
@@ -78,7 +78,11 @@ package body Candidates.Containers is
begin
if SU.Length (Left.Group) = SU.Length (Right.Group) then
if Left.Group = Right.Group then
- return Left.Group_Rank < Right.Group_Rank;
+ if SU.Length (Left.Group_Rank) = SU.Length (Right.Group_Rank) then
+ return Left.Group_Rank < Right.Group_Rank;
+ else
+ return SU.Length (Left.Group_Rank) < SU.Length (Right.Group_Rank);
+ end if;
else
return Left.Group < Right.Group;
end if;