More subtle bugfixes

This commit is contained in:
2022-09-08 05:42:39 +01:00
parent 5861602f23
commit a0ea0f7f31
4 changed files with 73 additions and 2 deletions

View File

@@ -327,6 +327,11 @@ static Opcode writeCompilerWithJumps(Compiler* compiler, Node* node, void* break
return node->binary.opcode;
}
if (ret != OP_EOF && (node->binary.opcode == OP_AND || node->binary.opcode == OP_OR || (node->binary.opcode >= OP_COMPARE_EQUAL && node->binary.opcode <= OP_INVERT))) {
compiler->bytecode[compiler->count++] = (unsigned char)ret; //1 byte
ret = OP_EOF; //untangle in this case
}
compiler->bytecode[compiler->count++] = (unsigned char)node->binary.opcode; //1 byte
return ret;