aboutgitcodelistschat:MatrixIRC
diff options
context:
space:
mode:
authorAlice Frosi <afrosi@redhat.com>2023-04-14 13:44:42 +0200
committerAlice Frosi <afrosi@redhat.com>2023-04-14 13:44:42 +0200
commit09fc3f511f7b5579fdc76eb43035c2758661f7f7 (patch)
treef81be6394a4f60e8bbd3a8500e3193a4031c9706
parent7f194d698d68df3b87dbc1a7b91c8227539a33ed (diff)
downloadseitan-09fc3f511f7b5579fdc76eb43035c2758661f7f7.tar
seitan-09fc3f511f7b5579fdc76eb43035c2758661f7f7.tar.gz
seitan-09fc3f511f7b5579fdc76eb43035c2758661f7f7.tar.bz2
seitan-09fc3f511f7b5579fdc76eb43035c2758661f7f7.tar.lz
seitan-09fc3f511f7b5579fdc76eb43035c2758661f7f7.tar.xz
seitan-09fc3f511f7b5579fdc76eb43035c2758661f7f7.tar.zst
seitan-09fc3f511f7b5579fdc76eb43035c2758661f7f7.zip
Fix filter offset for gt and lt
-rw-r--r--cooker/filter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cooker/filter.c b/cooker/filter.c
index a4e1857..8354ec5 100644
--- a/cooker/filter.c
+++ b/cooker/filter.c
@@ -298,7 +298,7 @@ static unsigned int gt(struct sock_filter filter[], int idx,
hi = get_hi((entry->args[idx]).value.v64);
lo = get_lo((entry->args[idx]).value.v64);
filter[size++] = (struct sock_filter)LOAD(HI_ARG(idx));
- filter[size++] = (struct sock_filter)GT(hi, jtrue, jfalse);
+ filter[size++] = (struct sock_filter)GT(hi, jtrue + 2, 0);
filter[size++] = (struct sock_filter)LOAD(LO_ARG(idx));
filter[size++] = (struct sock_filter)GT(lo, jtrue, jfalse);
break;
@@ -325,7 +325,7 @@ static unsigned int lt(struct sock_filter filter[], int idx,
hi = get_hi((entry->args[idx]).value.v64);
lo = get_lo((entry->args[idx]).value.v64);
filter[size++] = (struct sock_filter)LOAD(HI_ARG(idx));
- filter[size++] = (struct sock_filter)LT(hi, jtrue, jfalse);
+ filter[size++] = (struct sock_filter)LT(hi, jtrue + 2, jfalse);
filter[size++] = (struct sock_filter)LOAD(LO_ARG(idx));
filter[size++] = (struct sock_filter)LT(lo, jtrue, jfalse);
break;