Added a safety check to see if moment is less than date.
This commit is contained in:
parent
e984f50869
commit
122af13d85
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue