From 8759015d7efe346fc22febcc7f429cfd09bdac97 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Thu, 15 Dec 2011 16:10:31 -0800 Subject: * lib.c (appendv): bugfix: wrong way test. (vector_list): Wrong zero used, resulting in vector(nil) being called. --- ChangeLog | 5 +++++ lib.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18f9e17c..376ea128 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-12-15 Kaz Kylheku + + * lib.c (appendv): bugfix: wrong way test. + (vector_list): Wrong zero used, resulting in vector(nil) being called. + 2011-12-15 Kaz Kylheku * eval.c (eval_init): not added as synonym for null. diff --git a/lib.c b/lib.c index 9c3f1e34..cd15cd1b 100644 --- a/lib.c +++ b/lib.c @@ -373,7 +373,7 @@ val appendv(val lists) for (; lists; lists = cdr(lists)) { val item = car(lists); - if (listp(*ptail)) + if (!listp(*ptail)) uw_throwf(error_s, lit("append: ~s is not a list"), *ptail, nao); list_collect_append(ptail, item); } @@ -2357,7 +2357,7 @@ val size_vec(val vec) val vector_list(val list) { - val vec = vector(0); + val vec = vector(zero); if (!listp(list)) uw_throwf(error_s, lit("vector_list: list expected, not ~s"), list, nao); -- cgit v1.2.3