mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Avoid letting owner counts go bad.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user