Permalink
Browse files

Improve the overlap check - off-by-one.

  • Loading branch information...
1 parent a7b2ef9 commit 494a57d6e8525b95bc249b021a02f5d3e372c0dd @toad toad committed Jul 13, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/freenet/client/async/USKFetcher.java
@@ -1769,10 +1769,10 @@ public synchronized ToFetch getEditionsToFetch(long lookedUp, Random random, Arr
// If we have moved past the origUSK, then clear the KeyList for it.
for(Iterator<Entry<Long,KeyList>> it = fromSubscribers.entrySet().iterator();it.hasNext();) {
Entry<Long,KeyList> entry = it.next();
- long l = entry.getKey();
+ long l = entry.getKey() - 1;
if(l <= lookedUp)
it.remove();
- entry.getValue().getNextEditions(toFetch, toPoll, l-1, alreadyRunning, random);
+ entry.getValue().getNextEditions(toFetch, toPoll, l, alreadyRunning, random);
}
if(doRandom) {

0 comments on commit 494a57d

Please sign in to comment.