summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControlReference
diff options
context:
space:
mode:
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;
}