diff --git a/src/event_dispatcher_start.c b/src/event_dispatcher_start.c index a36b943..ecb4416 100644 --- a/src/event_dispatcher_start.c +++ b/src/event_dispatcher_start.c @@ -73,7 +73,7 @@ TR_eventDispatcherStart(TR_EventDispatcher this) size_t idx = TR_queueFirst(handler_queue); TR_EventDone done = TR_EVENT_PENDING; - while (idx != TR_queueLast(handler_queue)) { + while (idx != TR_queueLast(handler_queue) + 1) { TR_EventHandler handler = handler_queue->data[idx]; TR_EventDone this_done;