mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 04:29:21 +00:00
Fix off by one error in iterator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b095f2f02
commit
9d03724c8c
@ -390,7 +390,7 @@ class SparseBitVector {
|
||||
|
||||
// See if we ran out of Bits in this word.
|
||||
if (!Bits) {
|
||||
int NextSetBitNumber = Iter->find_next(BitNumber % ElementSize) ;
|
||||
int NextSetBitNumber = Iter->find_next((BitNumber - 1) % ElementSize) ;
|
||||
// If we ran out of set bits in this element, move to next element.
|
||||
if (NextSetBitNumber == -1 || (BitNumber % ElementSize == 0)) {
|
||||
++Iter;
|
||||
|
Loading…
Reference in New Issue
Block a user