Fixed bug with comparators where all results were flipped

This is because: say we have {a, b} where a is on top of the stack.  A
comparator C applies in the order C(b, a) i.e. b `C` a.  The previous
version did a `C` b which was wrong.
This commit is contained in:
2023-11-01 17:52:58 +00:00
parent 90d901345a
commit 081661cb6b

View File

@@ -655,7 +655,7 @@ VM_NOT_TYPE(word, WORD)
err = vm_pop_##TYPEL(vm, &b); \
if (err) \
return err; \
return vm_push_byte(vm, DBYTE(a.as_##GETL COMP b.as_##GETL)); \
return vm_push_byte(vm, DBYTE(b.as_##GETL COMP a.as_##GETL)); \
}
VM_BITWISE_TYPE(or, |, byte, BYTE)