summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2022-03-01 15:50:35 -0500
committerXANTRONIX Development2022-03-01 15:50:35 -0500
commit80f45719b50f394e0cc797fdb20342698afbd14e (patch)
tree5b6ac09cdd00e53ee8f7f05760fa1e158b92d072 /src
parent592f32327cc6c22f51f5a878c94673d8873fe21c (diff)
downloadxas-80f45719b50f394e0cc797fdb20342698afbd14e.tar.gz
xas-80f45719b50f394e0cc797fdb20342698afbd14e.tar.bz2
xas-80f45719b50f394e0cc797fdb20342698afbd14e.zip
Fix incorrect event sequencing
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;