diff options
Diffstat (limited to 'src/bytecode/vm.h')
-rwxr-xr-x[-rw-r--r--] | src/bytecode/vm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bytecode/vm.h b/src/bytecode/vm.h index f9e64d1..3a9b5af 100644..100755 --- a/src/bytecode/vm.h +++ b/src/bytecode/vm.h | |||
@@ -81,7 +81,7 @@ vm_interpret(VM vm, Chunk *chunk) { | |||
81 | case OP_SUB: { | 81 | case OP_SUB: { |
82 | Object a = array_pop(vm.stack); | 82 | Object a = array_pop(vm.stack); |
83 | Object b = array_pop(vm.stack); | 83 | Object b = array_pop(vm.stack); |
84 | array_push(vm.stack, a - b); | 84 | array_push(vm.stack, b - a); |
85 | } break; | 85 | } break; |
86 | case OP_MUL: { | 86 | case OP_MUL: { |
87 | Object a = array_pop(vm.stack); | 87 | Object a = array_pop(vm.stack); |
@@ -91,7 +91,7 @@ vm_interpret(VM vm, Chunk *chunk) { | |||
91 | case OP_DIV: { | 91 | case OP_DIV: { |
92 | Object a = array_pop(vm.stack); | 92 | Object a = array_pop(vm.stack); |
93 | Object b = array_pop(vm.stack); | 93 | Object b = array_pop(vm.stack); |
94 | array_push(vm.stack, a / b); | 94 | array_push(vm.stack, b / a); |
95 | } break; | 95 | } break; |
96 | case OP_MOD: { | 96 | case OP_MOD: { |
97 | Object a = array_pop(vm.stack); | 97 | Object a = array_pop(vm.stack); |