summaryrefslogtreecommitdiff
path: root/uscript/vm.h
diff options
context:
space:
mode:
authoriamcheeseman <[email protected]>2026-04-14 21:15:38 -0400
committeriamcheeseman <[email protected]>2026-04-14 21:15:38 -0400
commit7752d0b775c4df0de6fec688107e904ad20e1de6 (patch)
tree4255de168db8a527b7e99217021dd052bd2024e2 /uscript/vm.h
parenta2ebe62cdbbe12e75e3b5c79de3dce9fbeb1ca20 (diff)
microengine: compound operators
Diffstat (limited to 'uscript/vm.h')
-rw-r--r--uscript/vm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/uscript/vm.h b/uscript/vm.h
index 9ab1407..a20aa61 100644
--- a/uscript/vm.h
+++ b/uscript/vm.h
@@ -8,7 +8,7 @@
#define STACK_SIZE (MAX_CALL_FRAMES * 256)
#define vm_pop() (*(--vm.stacktop))
-#define vm_peek() (vm.stacktop[-1])
+#define vm_peek(i) (vm.stacktop[-1 - i])
#define vm_push(v) (*vm.stacktop++ = (v))
#define vm_get(i) (vm.cf->stackbot[i])