mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #4579 from heyitsanthony/txn-fix-if-clobber
clientv3: copy correct pointers into txn comparisons
This commit is contained in:
commit
5dfcdae521
@ -85,8 +85,8 @@ func (txn *txn) If(cs ...Cmp) Txn {
|
||||
|
||||
txn.cif = true
|
||||
|
||||
for _, cmp := range cs {
|
||||
txn.cmps = append(txn.cmps, (*pb.Compare)(&cmp))
|
||||
for i := range cs {
|
||||
txn.cmps = append(txn.cmps, (*pb.Compare)(&cs[i]))
|
||||
}
|
||||
|
||||
return txn
|
||||
|
Loading…
x
Reference in New Issue
Block a user