mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Bug fixes.
This commit is contained in:
@@ -69,7 +69,7 @@ uint32 RangeSet::getPrev (uint32 v) const
|
||||
if (it.second < v)
|
||||
return it.second;
|
||||
|
||||
if (contains (it, v + 1))
|
||||
if (contains (it, v - 1))
|
||||
return v - 1;
|
||||
}
|
||||
return absent;
|
||||
@@ -97,6 +97,12 @@ uint32 RangeSet::prevMissing (uint32 v) const
|
||||
result = cur->first - 1;
|
||||
break;
|
||||
}
|
||||
else if (v > cur->second)
|
||||
{
|
||||
if (v == cur->second + 1)
|
||||
result = cur->first - 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user