From 0786d75e676c7f5beb26d6ddc5b14799533462e2 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Fri, 11 Dec 2020 16:20:33 -0800 Subject: [PATCH] Correct C dremove() implementation (not used for implementation of the Lisp DREMOVE function) The C translation didn't observe that the value of (COND (C X)) is NIL if not C. modified: src/storage.c --- src/storage.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/storage.c b/src/storage.c index 9fb218b..67a0429 100644 --- a/src/storage.c +++ b/src/storage.c @@ -252,7 +252,8 @@ LispPTR dremove(LispPTR x, LispPTR l) { rplaca(l, car(cdr(l))); rplacd(l, cdr(cdr(l))); return (dremove(x, l)); - } + } else + return (NIL); } else { z = l; lp: