From b03041698277591677f303afd4c0d715ea844ba8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 21 Aug 2004 03:54:27 -0400 Subject: fixes to how commodities are looked up using quotes.cc --- amount.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'amount.cc') 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; } -- cgit v1.2.3