mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 15:04:22 +00:00
Fix a bug in bit_array's sub function (#2506)
This commit is contained in:
@@ -189,7 +189,7 @@ func (bA *BitArray) Sub(o *BitArray) *BitArray {
|
||||
if bA.Bits > o.Bits {
|
||||
c := bA.copy()
|
||||
for i := 0; i < len(o.Elems)-1; i++ {
|
||||
c.Elems[i] &= ^c.Elems[i]
|
||||
c.Elems[i] &= ^o.Elems[i]
|
||||
}
|
||||
i := len(o.Elems) - 1
|
||||
if i >= 0 {
|
||||
|
||||
Reference in New Issue
Block a user