From 80f45719b50f394e0cc797fdb20342698afbd14e Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 1 Mar 2022 15:50:35 -0500 Subject: Fix incorrect event sequencing --- src/script.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/script.c b/src/script.c index 8d57264..4bd69b1 100644 --- a/src/script.c +++ b/src/script.c @@ -56,8 +56,8 @@ static void add_event(xas_script *script, xas_script_event *ev) { return; } - if (!timercmp(¤t->timestamp, &ev->timestamp, <) - && timercmp(¤t->timestamp, &next->timestamp, <)) { + if (timercmp(&ev->timestamp, ¤t->timestamp, >=) + && timercmp(&ev->timestamp, &next->timestamp, <)) { current->next = ev; ev->next = next; -- cgit v1.2.3