altos/lisp: return from unmatched cond is #f, not nil
authorKeith Packard <keithp@keithp.com>
Fri, 1 Dec 2017 10:32:27 +0000 (11:32 +0100)
committerKeith Packard <keithp@keithp.com>
Fri, 1 Dec 2017 10:32:27 +0000 (11:32 +0100)
Fix the return value when we fall off the end of a cond expression to
be #f

Signed-off-by: Keith Packard <keithp@keithp.com>
src/lisp/ao_lisp_eval.c

index 1044aa48a6a3eff6122769dbdb95ea8c138cafcf..fa25edf02f1bc39f3001c9c0a50f2fc8dbc20241 100644 (file)
@@ -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;