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;