From 48dc3552a63f79f466e7a14327a05b4a0e0b7c07 Mon Sep 17 00:00:00 2001 From: Andy Hsu Date: Fri, 24 Mar 2023 20:34:03 +0800 Subject: [PATCH] fix(url_tree): incorrect tree structure --- drivers/url_tree/util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/url_tree/util.go b/drivers/url_tree/util.go index 0aa4dc83..4065218f 100644 --- a/drivers/url_tree/util.go +++ b/drivers/url_tree/util.go @@ -59,7 +59,7 @@ func BuildTree(text string, headSize bool) (*Node, error) { } // if level isn't greater than the level of the top of the stack // it is not the child of the top of the stack - if level <= stack[len(stack)-1].Level { + for level <= stack[len(stack)-1].Level { // pop the top of the stack stack = stack[:len(stack)-1] }