From 026514157db7967fcc678f1065725b85156cd3de Mon Sep 17 00:00:00 2001 From: Vinnie Falco Date: Thu, 4 Jul 2013 08:04:57 -0700 Subject: [PATCH] Yet another RangeSet fix --- modules/ripple_basics/containers/ripple_RangeSet.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ripple_basics/containers/ripple_RangeSet.cpp b/modules/ripple_basics/containers/ripple_RangeSet.cpp index 84854c0c0..8bdf266f7 100644 --- a/modules/ripple_basics/containers/ripple_RangeSet.cpp +++ b/modules/ripple_basics/containers/ripple_RangeSet.cpp @@ -99,7 +99,7 @@ uint32 RangeSet::prevMissing (uint32 v) const } else if (v > cur->second) { - // This range is "above" the interval + // v lies "above" the interval if (v == cur->second + 1) { @@ -116,6 +116,8 @@ uint32 RangeSet::prevMissing (uint32 v) const break; } } + + result = v - 1; } bassert (result == absent || !hasValue (result));