diff --git a/plugins/match.hpp b/plugins/match.hpp index 3da7e14af..120fba1ef 100644 --- a/plugins/match.hpp +++ b/plugins/match.hpp @@ -324,6 +324,8 @@ template class MapMatchingPlugin : public BasePlugin raw_route.segment_end_coordinates, std::vector(raw_route.segment_end_coordinates.size(), true), raw_route); + BOOST_ASSERT(raw_route.shortest_path_length != INVALID_EDGE_WEIGHT); + matchings.values.emplace_back(submatchingToJSON(sub, route_parameters, raw_route)); } diff --git a/routing_algorithms/map_matching.hpp b/routing_algorithms/map_matching.hpp index b28d397ed..b42e4804f 100644 --- a/routing_algorithms/map_matching.hpp +++ b/routing_algorithms/map_matching.hpp @@ -248,7 +248,7 @@ class MapMatching final : public BasicRoutingInterface prune - if (d_t > max_distance_delta) + if (d_t >= max_distance_delta) { continue; }