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:
@@ -655,7 +655,7 @@ VM_NOT_TYPE(word, WORD)
|
|||||||
err = vm_pop_##TYPEL(vm, &b); \
|
err = vm_pop_##TYPEL(vm, &b); \
|
||||||
if (err) \
|
if (err) \
|
||||||
return 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)
|
VM_BITWISE_TYPE(or, |, byte, BYTE)
|
||||||
|
|||||||
Reference in New Issue
Block a user