1
0
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:
Daniel Berlin 2007-10-04 21:18:20 +00:00
parent 8fa43b0ffc
commit bbe5e56458

View File

@ -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;