From e08394c87073a0115993945482709a31775affb4 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Tue, 23 Nov 2021 23:16:06 -0600 Subject: [PATCH] Fix struct proto missing when making a struct with a nil value. --- src/core/struct.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/struct.c b/src/core/struct.c index 853d61ea..3e9344c5 100644 --- a/src/core/struct.c +++ b/src/core/struct.c @@ -150,6 +150,7 @@ const JanetKV *janet_struct_end(JanetKV *st) { janet_struct_put(newst, kv->key, kv->value); } } + janet_struct_proto(newst) = janet_struct_proto(st); st = newst; } janet_struct_hash(st) = janet_kv_calchash(st, janet_struct_capacity(st));