Fix prevMissing/getValidatedRange

This commit is contained in:
David Schwartz
2013-07-25 11:39:54 -07:00
parent 8f7be26d0d
commit 9660e0c9ec
2 changed files with 2 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ uint32 RangeSet::prevMissing (uint32 v) const
if (cur->first > 0)
result = cur->first - 1;
else
result = absent;
result = v - 1;
}
break;

View File

@@ -243,7 +243,7 @@ bool LedgerMaster::getValidatedRange (uint32& minVal, uint32& maxVal)
minVal = mCompleteLedgers.prevMissing (maxVal);
if (minVal == RangeSet::absent)
minVal = 0;
minVal = maxVal;
else
++minVal;