Commit d40c9c54 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 5b5dd3c2
...@@ -848,7 +848,8 @@ func (t *Tree) Put(k interface{} /*K*/, upd func(oldV interface{} /*V*/, exists ...@@ -848,7 +848,8 @@ func (t *Tree) Put(k interface{} /*K*/, upd func(oldV interface{} /*V*/, exists
switch { switch {
case ok: case ok:
newV, written = upd(dd.d[i].v, true) oldV = dd.d[i].v
newV, written = upd(oldV, true)
if written { if written {
dd.d[i].v = newV dd.d[i].v = newV
} }
...@@ -924,7 +925,8 @@ func (t *Tree) Put(k interface{} /*K*/, upd func(oldV interface{} /*V*/, exists ...@@ -924,7 +925,8 @@ func (t *Tree) Put(k interface{} /*K*/, upd func(oldV interface{} /*V*/, exists
switch { switch {
case ok: case ok:
newV, written = upd(x.d[i].v, true) oldV = x.d[i].v
newV, written = upd(oldV, true)
if written { if written {
x.d[i].v = newV x.d[i].v = newV
} }
......
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