diff --git a/src/cpp/ripple/LedgerEntrySet.cpp b/src/cpp/ripple/LedgerEntrySet.cpp index c29e9a7e78..85679cdf80 100644 --- a/src/cpp/ripple/LedgerEntrySet.cpp +++ b/src/cpp/ripple/LedgerEntrySet.cpp @@ -909,7 +909,7 @@ uint256 LedgerEntrySet::getNextLedgerIndex(const uint256& uHash) // node found in LES, node found in ledger, return earliest if (it->second.mAction != taaDELETE) - return (ledgerNext < it->first) ? ledgerNext : it->first; + return (!ledgerNext.isZero() && (ledgerNext < it->first)) ? ledgerNext : it->first; }