We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f3f9c3 commit 5f632c9Copy full SHA for 5f632c9
vm.c
@@ -126,8 +126,8 @@ bool values_equal(Value a, Value b) {
126
127
Value peek(int offset) {
128
VM* vm;
129
- if (vm->stack_top - offset - 1 < 0) {
+ if ((intptr_t) (vm->stack_top - offset - 1) < 0) {
130
printf("Stack underflow!");
131
}
132
- return vm->stack[vm->stack_top - offset - 1];
+ return vm->stack[(int) (vm->stack_top - offset - 1)];
133
0 commit comments