Bug 41959: Handle edge case

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
(cherry picked from commit 6fbcedd5db)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This commit is contained in:
Andreas Jonsson 2026-03-06 20:21:50 +00:00 committed by Jacob O'Mara
parent 8393eeec63
commit d84e3dcd82
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

View File

@ -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 ) {