diff --git a/src/cpp/ripple/LedgerEntrySet.cpp b/src/cpp/ripple/LedgerEntrySet.cpp index a4f131296..0c1ed7119 100644 --- a/src/cpp/ripple/LedgerEntrySet.cpp +++ b/src/cpp/ripple/LedgerEntrySet.cpp @@ -861,7 +861,8 @@ TER LedgerEntrySet::ownerCountAdjust(const uint160& uOwnerID, int iAmount, SLE:: { const uint32 uOwnerCount = sleRoot->getFieldU32(sfOwnerCount); - sleRoot->setFieldU32(sfOwnerCount, uOwnerCount+iAmount); + if (iAmount + int(uOwnerCount) >= 0) + sleRoot->setFieldU32(sfOwnerCount, uOwnerCount+iAmount); terResult = tesSUCCESS; }