diff --git a/tree.go b/tree.go index 8f92c62d..160775ed 100644 --- a/tree.go +++ b/tree.go @@ -1180,14 +1180,14 @@ func (leaf *LeafNode) Commit() *Point { if !bytes.Equal(oldValue, leaf.values[i]) { if i < 128 { if c1 == nil { - c1, old1 = leaf.getOldCn(byte(i)) + c1, old1 = leaf.getOldCn(i) } - leaf.updateCn(byte(i), oldValue, c1) + leaf.updateCn(i, oldValue, c1) } else { if c2 == nil { - c2, old2 = leaf.getOldCn(byte(i)) + c2, old2 = leaf.getOldCn(i) } - leaf.updateCn(byte(i), oldValue, c2) + leaf.updateCn(i, oldValue, c2) } } }