diff --git a/modules/ripple_app/node/ripple_KeyvaDB.cpp b/modules/ripple_app/node/ripple_KeyvaDB.cpp index 75186920f..864b64964 100644 --- a/modules/ripple_app/node/ripple_KeyvaDB.cpp +++ b/modules/ripple_app/node/ripple_KeyvaDB.cpp @@ -398,7 +398,7 @@ public: // Binary tree insertion. // Link the last key record to the new key { - if (findResult.compare == -1) + if (findResult.compare < 0) { findResult.keyRecord.leftIndex = state->newKeyIndex; }