summaryrefslogtreecommitdiff
path: root/src/value.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-06-15 17:03:33 +0100
committerJohn Wiegley <johnw@newartisans.com>2009-06-15 17:52:20 +0100
commit981dc41eb7d0bfd04c23c4f208f76e986cd7007a (patch)
tree397b1244154f94f8985e9266325ef134c0ad6cf3 /src/value.cc
parentd45b35798cfd6f0aa72889455f9a87502cd00469 (diff)
downloadfork-ledger-981dc41eb7d0bfd04c23c4f208f76e986cd7007a.tar.gz
fork-ledger-981dc41eb7d0bfd04c23c4f208f76e986cd7007a.tar.bz2
fork-ledger-981dc41eb7d0bfd04c23c4f208f76e986cd7007a.zip
Allow integers to be multiplied with amounts
Fixes other part of 04C5E1CA-1B39-4214-81C7-FD5AA785308F
Diffstat (limited to 'src/value.cc')
-rw-r--r--src/value.cc1
1 files changed, 1 insertions, 0 deletions
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;