From: Keith Packard Date: Fri, 1 Dec 2017 10:32:27 +0000 (+0100) Subject: altos/lisp: return from unmatched cond is #f, not nil X-Git-Tag: 1.8.3~1^2~32 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=5d0b85f25fa1e5cc816a8256afb38cf9552f6d9d altos/lisp: return from unmatched cond is #f, not nil Fix the return value when we fall off the end of a cond expression to be #f Signed-off-by: Keith Packard --- diff --git a/src/lisp/ao_lisp_eval.c b/src/lisp/ao_lisp_eval.c index 1044aa48..fa25edf0 100644 --- a/src/lisp/ao_lisp_eval.c +++ b/src/lisp/ao_lisp_eval.c @@ -350,7 +350,7 @@ ao_lisp_eval_cond(void) DBGI(".. frame "); DBG_POLY(ao_lisp_frame_poly(ao_lisp_frame_current)); DBG("\n"); DBGI(".. saved frame "); DBG_POLY(ao_lisp_stack->frame); DBG("\n"); if (!ao_lisp_stack->sexprs) { - ao_lisp_v = AO_LISP_NIL; + ao_lisp_v = _ao_lisp_bool_false; ao_lisp_stack->state = eval_val; } else { ao_lisp_v = ao_lisp_poly_cons(ao_lisp_stack->sexprs)->car;