From 18c974117ee6bf2236e33d7b18eea340f5917ae1 Mon Sep 17 00:00:00 2001 From: RunasSudo Date: Sun, 5 Sep 2021 23:13:37 +1000 Subject: [PATCH] (cont.) Take num_to_exclude into consideration for bulk exclusion --- src/stv/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stv/mod.rs b/src/stv/mod.rs index d6651ae..8517f6b 100644 --- a/src/stv/mod.rs +++ b/src/stv/mod.rs @@ -1164,7 +1164,7 @@ fn can_bulk_elect(state: &CountState, num_to_exclude: usize) -> bo }) .count(); - if num_hopefuls > 0 && state.num_elected + num_hopefuls - num_to_exclude <= state.election.seats { + if num_hopefuls - num_to_exclude > 0 && state.num_elected + num_hopefuls - num_to_exclude <= state.election.seats { return true; } return false;