Commit 3de84de2 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent fbc00f11
......@@ -306,8 +306,8 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
if !ok {
return fmt.Errorf("data: expect (...); got %T", t[0])
}
if len(t) % 2 != 0 {
return fmt.Errorf("data: expect [%%2](); got [%d]()", len(t))
if len(t) % 2 == 0 {
return fmt.Errorf("data: expect [!%%2](); got [%d]()", len(t))
}
bt.firstbucket, ok = t[1].(*Bucket)
......@@ -315,7 +315,7 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
return fmt.Errorf("first bucket: must be Bucket; got %T", t[1])
}
n := len(t) / 2
n := (len(t) + 1) / 2
bt.data = make([]zBTreeItem, 0, n)
for i, idx := 0, 0; i < n; i++ {
key := int64(0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment