Fixed pointer corruption bug in timer.c
This commit is contained in:
@@ -101,12 +101,14 @@ int timer_running(struct timer *timer)
|
|||||||
|
|
||||||
void process_timer(void)
|
void process_timer(void)
|
||||||
{
|
{
|
||||||
struct timer *timer = timer_head;
|
struct timer *timer;
|
||||||
double now;
|
double now;
|
||||||
|
|
||||||
now = get_time();
|
now = get_time();
|
||||||
|
|
||||||
again:
|
again:
|
||||||
|
timer = timer_head;
|
||||||
|
|
||||||
while (timer) {
|
while (timer) {
|
||||||
if (timer->linked && timer->timeout > 0 && now >= timer->timeout) {
|
if (timer->linked && timer->timeout > 0 && now >= timer->timeout) {
|
||||||
timer->timeout = 0;
|
timer->timeout = 0;
|
||||||
|
Reference in New Issue
Block a user