Small envForLambda() fix.

All tests are passing now, though there may still be a small leak.
This commit is contained in:
Sage Vaillancourt 2022-04-04 21:08:18 -04:00
parent caaa6c53f6
commit eb2dde72e3
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,7 @@ struct Environment envForLambda(const Object* params, const Object* arg_forms, i
} }
struct Environment env = { struct Environment env = {
.outer = outer, .outer = NULL,
.table = buildTable(4), .table = buildTable(4),
.refs = 1, .refs = 1,
}; };
@ -125,6 +125,7 @@ struct Environment envForLambda(const Object* params, const Object* arg_forms, i
cleanObject(&newEnvObj); cleanObject(&newEnvObj);
march = march ? march->forward : NULL; march = march ? march->forward : NULL;
} }
env.outer = outer;
return env; return env;
} }