From c48771710825dbecb8fb5802d23efc328cb0c51c Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 2 Jul 2013 13:34:15 -0700 Subject: [PATCH] prevMissing searches in the wrong direction. --- modules/ripple_basics/containers/ripple_RangeSet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/ripple_basics/containers/ripple_RangeSet.cpp b/modules/ripple_basics/containers/ripple_RangeSet.cpp index 83fb27e642..0bd84ffa3e 100644 --- a/modules/ripple_basics/containers/ripple_RangeSet.cpp +++ b/modules/ripple_basics/containers/ripple_RangeSet.cpp @@ -78,7 +78,7 @@ uint32 RangeSet::getPrev (uint32 v) const uint32 RangeSet::prevMissing (uint32 v) const { // largest number not in the set that is less than the given number - BOOST_FOREACH (const value_type & it, mRanges) + BOOST_REVERSE_FOREACH (const value_type & it, mRanges) { if (contains (it, v)) return (it.first == 0) ? absent : (it.first - 1);