Bug 41959: Handle edge case

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
Andreas Jonsson 2026-03-06 20:21:50 +00:00 committed by Martin Renvoize
parent 890ce7cc49
commit 6fbcedd5db
No known key found for this signature in database
GPG Key ID: 2D86E0EAEC83711B
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 ) {