Fixed pointer corruption bug in timer.c

This commit is contained in:
Andreas Eversberg 2017-11-11 08:40:05 +01:00
parent 8a74805ea6
commit fc1c5de547
1 changed files with 3 additions and 1 deletions

View File

@ -101,12 +101,14 @@ int timer_running(struct timer *timer)
void process_timer(void)
{
struct timer *timer = timer_head;
struct timer *timer;
double now;
now = get_time();
again:
timer = timer_head;
while (timer) {
if (timer->linked && timer->timeout > 0 && now >= timer->timeout) {
timer->timeout = 0;