From cf71680aeed278054074da2809219ff0b168d37c Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Fri, 8 Nov 2013 11:05:05 -0800 Subject: [PATCH] Don't return too many paths. --- src/ripple_app/paths/Pathfinder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ripple_app/paths/Pathfinder.cpp b/src/ripple_app/paths/Pathfinder.cpp index 7291083e4..5dcb9e5e5 100644 --- a/src/ripple_app/paths/Pathfinder.cpp +++ b/src/ripple_app/paths/Pathfinder.cpp @@ -355,7 +355,7 @@ STPathSet Pathfinder::filterPaths(int iMaxPaths, STPath& extraPath) { path_LQ_t& lqt = vMap[i]; - if ((iPathsLeft > 1) || (lqt.get<2> () >= remaining)) + if ((iPathsLeft > 1) || ((iPathsLeft > 0) && (lqt.get<2> () >= remaining))) { // last path must fill --iPathsLeft;