From 981dc41eb7d0bfd04c23c4f208f76e986cd7007a Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 15 Jun 2009 17:03:33 +0100 Subject: Allow integers to be multiplied with amounts Fixes other part of 04C5E1CA-1B39-4214-81C7-FD5AA785308F --- src/value.cc | 1 + 1 file changed, 1 insertion(+) (limited to 'src/value.cc') diff --git a/src/value.cc b/src/value.cc index 53e2bdeb..f34d0e48 100644 --- a/src/value.cc +++ b/src/value.cc @@ -573,6 +573,7 @@ value_t& value_t::operator*=(const value_t& val) return *this; case AMOUNT: if (as_amount().commodity() == val.as_amount().commodity() || + ! as_amount().has_commodity() || ! val.as_amount().has_commodity()) { as_amount_lval() *= val.as_amount(); return *this; -- cgit v1.2.3