mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
timer: fix use of zero'd memory
This commit is contained in:
@@ -102,6 +102,7 @@ void timer_insert(timer_t *timer, timerentry_t *entry, dpcfn_t fn, dpcarg_t arg,
|
|||||||
if (timer->running)
|
if (timer->running)
|
||||||
timer->tickcurrent += timer->stop(timer);
|
timer->tickcurrent += timer->stop(timer);
|
||||||
|
|
||||||
|
memset(entry, 0, sizeof(timerentry_t));
|
||||||
entry->repeatus = repeating ? us : 0;
|
entry->repeatus = repeating ? us : 0;
|
||||||
entry->fn = fn;
|
entry->fn = fn;
|
||||||
entry->arg = arg;
|
entry->arg = arg;
|
||||||
|
|||||||
Reference in New Issue
Block a user