Allow integers to be multiplied with amounts

Fixes other part of 04C5E1CA-1B39-4214-81C7-FD5AA785308F
This commit is contained in:
John Wiegley 2009-06-15 17:03:33 +01:00
parent d45b35798c
commit 981dc41eb7

View file

@ -573,6 +573,7 @@ value_t& value_t::operator*=(const value_t& val)
return *this; return *this;
case AMOUNT: case AMOUNT:
if (as_amount().commodity() == val.as_amount().commodity() || if (as_amount().commodity() == val.as_amount().commodity() ||
! as_amount().has_commodity() ||
! val.as_amount().has_commodity()) { ! val.as_amount().has_commodity()) {
as_amount_lval() *= val.as_amount(); as_amount_lval() *= val.as_amount();
return *this; return *this;