summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-21 03:54:27 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-21 03:54:27 -0400
commitb03041698277591677f303afd4c0d715ea844ba8 (patch)
tree0a9be7f6d3898b202ba804e37defe7c2cb6fb1ac /amount.cc
parent9350433499396d804c1343bc772894a248434a47 (diff)
downloadfork-ledger-b03041698277591677f303afd4c0d715ea844ba8.tar.gz
fork-ledger-b03041698277591677f303afd4c0d715ea844ba8.tar.bz2
fork-ledger-b03041698277591677f303afd4c0d715ea844ba8.zip
fixes to how commodities are looked up using quotes.cc
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/amount.cc b/amount.cc
index ccad248b..1ec23926 100644
--- a/amount.cc
+++ b/amount.cc
@@ -980,7 +980,8 @@ amount_t commodity_t::value(const std::time_t moment)
}
if (updater)
- (*updater)(this, moment, age, price);
+ (*updater)(this, moment, age,
+ history.size() > 0 ? (*history.rbegin()).first : 0, price);
return price;
}