mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-04 03:46:42 +01:00
ExpressionParser: Fix timer function with negative values.
This commit is contained in:
parent
18b5120441
commit
08b291b0f9
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user