From a2ad204f4b7c3f4c3f3c5165bb91792caf8ace49 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 22 Sep 2021 20:25:10 -0400 Subject: [PATCH] Fix off-by-one in AssembleTuningPath Fixes https://gitlab.com/kicad/code/kicad/-/issues/9003 --- pcbnew/router/pns_topology.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/router/pns_topology.cpp b/pcbnew/router/pns_topology.cpp index 0958655725..32d5584c25 100644 --- a/pcbnew/router/pns_topology.cpp +++ b/pcbnew/router/pns_topology.cpp @@ -381,7 +381,7 @@ const ITEM_SET TOPOLOGY::AssembleTuningPath( ITEM* aStart, SOLID** aStartPad, SO aLine.Remove( start, clip - 1 ); // Now connect the dots - aLine.Insert( aForward ? 0 : aLine.PointCount() - 1, aPad->GetPosition() ); + aLine.Insert( aForward ? 0 : aLine.PointCount(), aPad->GetPosition() ); }; auto processPad =