From fed18ccb88e03f511317ca593d9ad10038451d17 Mon Sep 17 00:00:00 2001 From: Oskari Timperi Date: Thu, 15 May 2014 23:40:28 +0300 Subject: fix eval() and eval_str() to use empty environments as args to eval_env()/eval_str_env() --- eval.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 1fd6a6a..0addb86 100644 --- a/eval.c +++ b/eval.c @@ -73,12 +73,16 @@ static int atom_cmp(struct list *a, struct list *b) struct list *eval(struct list *list) { - return eval_env(list, NULL); + struct list env; + memset(&env, 0, sizeof(env)); + return eval_env(list, &env); } struct list *eval_str(const char *str) { - return eval_str_env(str, NULL); + struct list env; + memset(&env, 0, sizeof(env)); + return eval_str_env(str, &env); } struct list *eval_env(struct list *expr, struct list *env) -- cgit v1.2.3