Skip to content

Commit

Permalink
tree: range over nodes values (#2229)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkerou authored Feb 9, 2020
1 parent 731c827 commit acac7b1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tree.go
Original file line number Diff line number Diff line change
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 acac7b1

Please sign in to comment.