mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-05-10 05:02:41 +00:00
ExpressionParser: Fix timer function with negative values.
This commit is contained in:
parent
18b5120441
commit
08b291b0f9
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue