mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
Avoiding potential segfault from trying to capture temporary local variables in a macro.
Fixes issue #252.
This commit is contained in:
parent
579fcf95ae
commit
aa3f869798
1 changed files with 1 additions and 1 deletions
2
eval.c
2
eval.c
|
@ -100,7 +100,7 @@ static sexp sexp_env_cell_loc1 (sexp env, sexp key, int localp, sexp *varenv) {
|
|||
|
||||
static sexp sexp_env_cell_loc (sexp ctx, sexp env, sexp key, int localp, sexp *varenv) {
|
||||
sexp cell = sexp_env_cell_loc1(env, key, localp, varenv);
|
||||
while (!cell && sexp_synclop(key)) {
|
||||
while (!cell && key && sexp_synclop(key)) {
|
||||
if (sexp_not(sexp_memq(ctx, sexp_synclo_expr(key), sexp_context_fv(ctx)))
|
||||
&& sexp_not(sexp_memq(ctx, sexp_synclo_expr(key), sexp_synclo_free_vars(key))))
|
||||
env = sexp_synclo_env(key);
|
||||
|
|
Loading…
Add table
Reference in a new issue