From 6fbcedd5db9713c856c4ba5658c400fa35ad366f Mon Sep 17 00:00:00 2001 From: Andreas Jonsson Date: Fri, 6 Mar 2026 20:21:50 +0000 Subject: [PATCH] Bug 41959: Handle edge case Signed-off-by: Nick Clemens Signed-off-by: Martin Renvoize --- C4/HoldsQueue.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/HoldsQueue.pm b/C4/HoldsQueue.pm index c1d46954d1..9abe6f1182 100644 --- a/C4/HoldsQueue.pm +++ b/C4/HoldsQueue.pm @@ -484,7 +484,7 @@ sub _allocateWithTransportCostMatrix { RETRY: while (1) { - return [] if $num_agents == 0 || $num_tasks == 0; + return [] if $num_agents == 0 || $num_tasks + scalar(@remaining) == 0; if ( $num_tasks < $num_agents && @remaining ) {