Fixed negative variables handled incorrectly

This commit is contained in:
2026-05-26 18:01:49 +10:00
parent 69175e801a
commit 190477add8
6 changed files with 40 additions and 3 deletions
+4
View File
@@ -233,6 +233,10 @@ int inspect_instruction(unsigned char* bytecode, unsigned int pc, unsigned int j
printf(MARKER "MODULO %s\n", MARKER_VALUE(pc, unsigned char), bytecode[pc + 1] == TOY_OPCODE_ASSIGN ? "and ASSIGN" : "");
return 4;
case TOY_OPCODE_INVERT:
printf(MARKER "INVERT\n", MARKER_VALUE(pc, unsigned char));
return 4;
case TOY_OPCODE_COMPARE_EQUAL:
printf(MARKER "COMPARE %s\n", MARKER_VALUE(pc, unsigned char), bytecode[pc + 1] != TOY_OPCODE_NEGATE ? "==" : "!=");
return 4;