From 60622614731bc42dd44704d3cff55b4e4c4f492c Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Sat, 11 Feb 2023 13:40:10 -0800 Subject: Write a garbage collector. Does it work? No, but it compiles. --- bytecode/encoding.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bytecode/encoding.c') 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); -- cgit v1.3.1