mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
set! should guard against exceptions in the var ref lookup (fixes issue #762)
This commit is contained in:
parent
879c16c3d9
commit
24fb7585c7
1 changed files with 1 additions and 1 deletions
2
eval.c
2
eval.c
|
@ -790,7 +790,7 @@ static sexp analyze_set (sexp ctx, sexp x, int depth) {
|
|||
res = sexp_compile_error(ctx, "bad set! syntax", x);
|
||||
} else {
|
||||
ref = analyze_var_ref(ctx, sexp_cadr(x), &varenv);
|
||||
if (sexp_lambdap(sexp_ref_loc(ref)))
|
||||
if (sexp_refp(ref) && sexp_lambdap(sexp_ref_loc(ref)))
|
||||
sexp_insert(ctx, sexp_lambda_sv(sexp_ref_loc(ref)), sexp_ref_name(ref));
|
||||
value = analyze(ctx, sexp_caddr(x), depth, 0);
|
||||
if (sexp_exceptionp(ref)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue