From 9d60e8b3430ecee3533b8e9371e76c9c8d806647 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Fri, 22 Feb 2019 10:16:32 -0500 Subject: [PATCH] Address issue #54 Bug when marshalling function environments that were still on a fiber stack. --- src/core/marsh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/marsh.c b/src/core/marsh.c index a5d4a89a..52dbe922 100644 --- a/src/core/marsh.c +++ b/src/core/marsh.c @@ -804,7 +804,7 @@ static const uint8_t *unmarshal_one_fiber( data = unmarshal_one_env(st, data, &env, flags + 1); if (env->offset != 0 && env->offset != offset) janet_panic("funcenv offset does not match fiber frame"); - if (env->length != 0 && env->length != offset) + if (env->length != 0 && env->length != length) janet_panic("funcenv length does not match fiber frame"); env->offset = offset; env->length = length;