tree: range over nodes values (#2229)

This commit is contained in:
thinkerou 2020-02-09 10:46:22 +08:00 committed by wuhuizuo
parent 5c7a721938
commit cb605c3550

View File

@ -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
}
}