Fixed a case where adding an amount to an integer failed.
This commit is contained in:
parent
37a1989ca0
commit
a072b7e208
1 changed files with 4 additions and 0 deletions
|
|
@ -390,6 +390,10 @@ value_t& value_t::operator+=(const value_t& val)
|
|||
as_long_lval() += val.as_long();
|
||||
return *this;
|
||||
case AMOUNT:
|
||||
if (val.as_amount().has_commodity()) {
|
||||
in_place_cast(BALANCE);
|
||||
return *this += val;
|
||||
}
|
||||
in_place_cast(AMOUNT);
|
||||
as_amount_lval() += val.as_amount();
|
||||
return *this;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue