summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-06-26 07:31:57 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-06-26 07:31:57 -0700
commit3ac163ce1fd61384789a0a2943f1f94d47cb3223 (patch)
treed8bc51393525be37965e206eebf7176165b266d1 /lib.c
parentd5e21633e094e4f0a71939c65637d55aa7f9c536 (diff)
downloadtxr-3ac163ce1fd61384789a0a2943f1f94d47cb3223.tar.gz
txr-3ac163ce1fd61384789a0a2943f1f94d47cb3223.tar.bz2
txr-3ac163ce1fd61384789a0a2943f1f94d47cb3223.zip
* lib.c (last): Bugfix: reversed null test.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 3846d885..bb0d580f 100644
--- a/lib.c
+++ b/lib.c
@@ -421,7 +421,7 @@ loc lastcons(val list)
val last(val list)
{
loc p = lastcons(list);
- return nullocp(p) ? deref(p) : list;
+ return nullocp(p) ? list : deref(p);
}
loc ltail(loc cons)