mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 02:52:53 +02:00
Fix off by one error in iterator
llvm-svn: 42612
This commit is contained in:
parent
8fa43b0ffc
commit
bbe5e56458
@ -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