ExpressionParser: Fix timer function with negative values.

This commit is contained in:
Jordan Woyak 2019-01-26 14:48:26 -06:00
parent 18b5120441
commit 08b291b0f9
1 changed files with 2 additions and 2 deletions

View File

@ -114,9 +114,9 @@ private:
ControlState progress = std::chrono::duration_cast<FSec>(elapsed).count() / val; ControlState progress = std::chrono::duration_cast<FSec>(elapsed).count() / val;
if (std::isinf(progress)) if (std::isinf(progress) || progress < 0.0)
{ {
// User configured a 0.0 length timer. Reset the timer and return 0.0. // User configured a non-positive timer. Reset the timer and return 0.0.
progress = 0.0; progress = 0.0;
m_start_time = now; m_start_time = now;
} }