diff --git a/src/env.c b/src/env.c index edd49a3..bfc8f07 100644 --- a/src/env.c +++ b/src/env.c @@ -103,7 +103,7 @@ struct Environment envForLambda(const Object* params, const Object* arg_forms, i } struct Environment env = { - .outer = outer, + .outer = NULL, .table = buildTable(4), .refs = 1, }; @@ -125,6 +125,7 @@ struct Environment envForLambda(const Object* params, const Object* arg_forms, i cleanObject(&newEnvObj); march = march ? march->forward : NULL; } + env.outer = outer; return env; }