TimingEvent: Fix possible negative tick execution

This commit is contained in:
Connor McLaughlin 2021-07-03 14:29:39 +10:00
parent dbe5f3c30c
commit a6abf7a83d
1 changed files with 1 additions and 1 deletions

View File

@ -455,7 +455,7 @@ void TimingEvent::InvokeEarly(bool force /* = false */)
const TickCount pending_ticks = CPU::GetPendingTicks();
const TickCount ticks_to_execute = m_time_since_last_run + pending_ticks;
if (!force && ticks_to_execute < m_period)
if ((!force && ticks_to_execute < m_period) || ticks_to_execute <= 0)
return;
m_downcount = pending_ticks + m_interval;