From 005f9e58bebf6e432cb07640801f223a4b8d9d9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Karas?= Date: Wed, 29 Mar 2023 23:51:25 +0200 Subject: [PATCH] fix turn restrictions Exclude::targetIndex is index to route node path, not object --- libosmscout/src/osmscout/routing/AbstractRoutingService.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;