diff --git a/libosmscout/src/osmscout/routing/AbstractRoutingService.cpp b/libosmscout/src/osmscout/routing/AbstractRoutingService.cpp index 006a1416d..91a3fe9e2 100644 --- a/libosmscout/src/osmscout/routing/AbstractRoutingService.cpp +++ b/libosmscout/src/osmscout/routing/AbstractRoutingService.cpp @@ -738,7 +738,7 @@ namespace osmscout { for (const auto& exclude : currentRouteNode->excludes) { if (exclude.source==current->object && - currentRouteNode->objects[exclude.targetIndex].object==currentRouteNode->objects[path.objectIndex].object) { + currentRouteNode->objects[currentRouteNode->paths[exclude.targetIndex].objectIndex].object==currentRouteNode->objects[path.objectIndex].object) { if constexpr (debugRouting) { std::cout << " Skipping route"; std::cout << " to " << dbId << " / " << path.id;