From 96fc08dd0b020d9476a0a641372eec74d967689d Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Tue, 4 Feb 2014 14:20:01 +0900 Subject: [PATCH] [bugfix] close only closed variables... --- src/codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/codegen.c b/src/codegen.c index dcaab644..1dfb0e7f 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -625,7 +625,7 @@ analyze_lambda(analyze_state *state, pic_value obj) closes = pic_nil_value(); for (i = 1; i < scope->argc + scope->localc; ++i) { pic_sym var = scope->vars[i]; - if (xh_get(scope->var_tbl, pic_symbol_name(pic, var))) { + if (xh_get(scope->var_tbl, pic_symbol_name(pic, var))->val == 1) { closes = pic_cons(pic, pic_symbol_value(var), closes); } }