Skip to content

Commit

Permalink
tree: range over nodes values (gin-gonic#2229)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkerou authored and ThomasObenaus committed Feb 19, 2020
1 parent e619a88 commit 80cbab0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tree.go
Expand Up @@ -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
}
}

Expand Down

0 comments on commit 80cbab0

Please sign in to comment.