Skip to content

Commit

Permalink
Fix an operator opcode
Browse files Browse the repository at this point in the history
  • Loading branch information
RobDangerous committed Aug 18, 2024
1 parent 27b05f5 commit b4cedba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/backends/cstyle.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void cstyle_write_opcode(char *code, size_t *offset, opcode *o, type_string_func
*offset += sprintf(&code[*offset], "\t_%" PRIu64 " = _%" PRIu64 ";\n", o->op_store_var.to.index, o->op_store_var.from.index);
break;
case OPCODE_SUB_AND_STORE_VARIABLE:
*offset += sprintf(&code[*offset], "\t_%" PRIu64 " /= _%" PRIu64 ";\n", o->op_store_var.to.index, o->op_store_var.from.index);
*offset += sprintf(&code[*offset], "\t_%" PRIu64 " -= _%" PRIu64 ";\n", o->op_store_var.to.index, o->op_store_var.from.index);
break;
case OPCODE_ADD_AND_STORE_VARIABLE:
*offset += sprintf(&code[*offset], "\t_%" PRIu64 " += _%" PRIu64 ";\n", o->op_store_var.to.index, o->op_store_var.from.index);
Expand Down

0 comments on commit b4cedba

Please sign in to comment.