summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
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 31351fba..f70372fb 100644
--- a/lib.c
+++ b/lib.c
@@ -726,7 +726,7 @@ val nthcdr(val pos, val list)
gc_hint(list);
- while (n-- > 0)
+ while (list && n-- > 0)
list = cdr(list);
return list;