summaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm.c b/vm.c
index 6084f21..39bf65d 100644
--- a/vm.c
+++ b/vm.c
@@ -100,6 +100,9 @@ int runvm(State *S) {
}
Val v = ht_get(S, &S->globals, AS_STRING(varname));
PUSH(v);
+ if (IS_NIL(v)) {
+ printf("warning: nil global read %s\n", AS_CSTRING(varname));
+ }
break;
}
case OP_SETGLOBAL: {