summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControlReference
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2019-01-26 14:48:26 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2019-10-11 18:12:18 -0500
commit08b291b0f9ca3edfd8603a32f2e62f658d012c4a (patch)
tree6c15de46850ee2bb161141a2c0756df1c6fb09e6 /Source/Core/InputCommon/ControlReference
parent18b51204417bac5f0d436d219885c0ac42e2eb70 (diff)
ExpressionParser: Fix timer function with negative values.
Diffstat (limited to 'Source/Core/InputCommon/ControlReference')
-rw-r--r--Source/Core/InputCommon/ControlReference/FunctionExpression.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/InputCommon/ControlReference/FunctionExpression.cpp b/Source/Core/InputCommon/ControlReference/FunctionExpression.cpp
index 9e6607bce4..d233519b34 100644
--- a/Source/Core/InputCommon/ControlReference/FunctionExpression.cpp
+++ b/Source/Core/InputCommon/ControlReference/FunctionExpression.cpp
@@ -114,9 +114,9 @@ private:
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;
m_start_time = now;
}