From 0717a2e3d38b23c5e0cea55d8aed4e89a279d860 Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Fri, 11 Aug 2023 18:36:13 +0400 Subject: [PATCH] In case a path continues, but no child was found then break out of main for loop. It was a bug that when there are children in the next node, but no parameterised one, having a non-existent path element caused the main loop to continue and firing an if pathLen == i+1 case like if there was a legit node found. --- httpr.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/httpr.go b/httpr.go index d085c88..0c12dc5 100644 --- a/httpr.go +++ b/httpr.go @@ -96,6 +96,8 @@ outer: curNode = paramNode continue } + + break outer } }