mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-02 16:26:48 +00:00
fix incorrect emplace result check logic
This commit is contained in:
@@ -349,14 +349,14 @@ PaymentSandbox::balanceChanges(ReadView const& view) const
|
||||
auto const cur = newBalance.getCurrency();
|
||||
result[std::make_tuple(lowID, highID, cur)] = delta;
|
||||
auto r = result.emplace(std::make_tuple(lowID, lowID, cur), delta);
|
||||
if (r.second)
|
||||
if (!r.second)
|
||||
{
|
||||
r.first->second += delta;
|
||||
}
|
||||
|
||||
delta.negate();
|
||||
r = result.emplace(std::make_tuple(highID, highID, cur), delta);
|
||||
if (r.second)
|
||||
if (!r.second)
|
||||
{
|
||||
r.first->second += delta;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user