[bugfix] close only closed variables...

This commit is contained in:
Yuichi Nishiwaki 2014-02-04 14:20:01 +09:00
parent a3b0fa701b
commit 96fc08dd0b
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}