summaryrefslogtreecommitdiffstats
path: root/bytecode/encoding.c
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2023-02-11 13:40:10 -0800
committerRose Hogenson <rhogenson@posteo.net>2023-02-11 13:40:10 -0800
commit60622614731bc42dd44704d3cff55b4e4c4f492c (patch)
treedcf3b31f46c1b46e23d5c379a9201195ccb4f1ce /bytecode/encoding.c
parent5aec138c3832a65bad4b2bdaa7ca36cf5c279ac8 (diff)
downloadsml-60622614731bc42dd44704d3cff55b4e4c4f492c.tar.zst
Write a garbage collector.
Does it work? No, but it compiles.
Diffstat (limited to 'bytecode/encoding.c')
-rw-r--r--bytecode/encoding.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bytecode/encoding.c b/bytecode/encoding.c
index 62c9762..520b6c3 100644
--- a/bytecode/encoding.c
+++ b/bytecode/encoding.c
@@ -34,7 +34,7 @@ static local parse_local(struct reader *r)
panicf("local: no data!\n");
}
local res = r->data.buf[0];
- if (res > 7) {
+ if (res >= NUM_LOCALS) {
panicf("Invalid local (out of range): %d\n", res);
}
advance(r, 1);