summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/script.c4
1 files 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(&current->timestamp, &ev->timestamp, <)
- && timercmp(&current->timestamp, &next->timestamp, <)) {
+ if (timercmp(&ev->timestamp, &current->timestamp, >=)
+ && timercmp(&ev->timestamp, &next->timestamp, <)) {
current->next = ev;
ev->next = next;