diff --git a/routing_algorithms/many_to_many.hpp b/routing_algorithms/many_to_many.hpp index 112971c7a..636510f69 100644 --- a/routing_algorithms/many_to_many.hpp +++ b/routing_algorithms/many_to_many.hpp @@ -171,7 +171,7 @@ template class ManyToManyRouting final : public BasicRouting (*result_table)[source_id * number_of_locations + target_id]; // check if new distance is better const EdgeWeight new_distance = source_distance + target_distance; - if (new_distance > 0 && new_distance < current_distance) + if (new_distance >= 0 && new_distance < current_distance) { (*result_table)[source_id * number_of_locations + target_id] = (source_distance + target_distance);