diff --git a/tree.go b/tree.go index b88eefa5..b687ec43 100644 --- a/tree.go +++ b/tree.go @@ -169,9 +169,9 @@ walk: } // Update maxParams (max of all children) - for i := range child.children { - if child.children[i].maxParams > child.maxParams { - child.maxParams = child.children[i].maxParams + for _, v := range child.children { + if v.maxParams > child.maxParams { + child.maxParams = v.maxParams } }