bug fix: bit map for each bit

This commit is contained in:
finley
2023-02-08 22:35:49 +08:00
parent fe20c6c9e1
commit 85ce68768a
2 changed files with 6 additions and 3 deletions

View File

@@ -74,10 +74,13 @@ func (b *BitMap) ForEachBit(begin int64, end int64, cb Callback) {
}
bitOffset++
offset++
if offset >= end {
break
}
}
byteIndex++
bitOffset = 0
if end > 0 && offset == end {
if end > 0 && offset >= end {
break
}
}