Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/cosmos/cosmos-sdk into likh…
Browse files Browse the repository at this point in the history
…ita/add-amino-endpoints
  • Loading branch information
likhita-809 committed Nov 24, 2022
2 parents 411c5ec + 00ad3ec commit 885ad11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/types/compact_bit_array.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (bA *CompactBitArray) NumTrueBitsBefore(index int) int {
index = max
}
// below we iterate over the bytes then over bits (in low endian) and count bits set to 1
for elem := 0; elem < len(bA.Elems); elem++ {
for elem := range bA.Elems {
if elem*8+7 >= index {
onesCount += bits.OnesCount8(bA.Elems[elem] >> (7 - (index % 8) + 1))
return onesCount
Expand Down

0 comments on commit 885ad11

Please sign in to comment.