From 64d1eb9cee9da7636d1edb5b0b19ca0d418dbfde Mon Sep 17 00:00:00 2001 From: Georg Hopp Date: Mon, 26 Oct 2015 17:07:20 +0100 Subject: [PATCH] Fix while loop abort condition --- src/event_dispatcher_start.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;