From 122af13d853193fab1cd2c73980c4dd196cd598b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 10 Nov 2005 12:06:07 +0000 Subject: Added a safety check to see if moment is less than date. --- quotes.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'quotes.cc') diff --git a/quotes.cc b/quotes.cc index 2c1f3723..d3f84439 100644 --- a/quotes.cc +++ b/quotes.cc @@ -29,7 +29,8 @@ void quotes_by_script::operator()(commodity_t& commodity, if ((commodity.history && std::difftime(now, commodity.history->last_lookup) < pricing_leeway) || std::difftime(now, last) < pricing_leeway || - (price && std::difftime(moment, date) <= pricing_leeway)) + (price && std::difftime(moment, date) > 0 && + std::difftime(moment, date) <= pricing_leeway)) return; using namespace std; -- cgit v1.2.3