summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-09-06 07:23:09 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-09-06 07:23:09 -0700
commit1a444721869bca8f94f1a5370b9d177444e35ea8 (patch)
tree7125035b9d519f6aab0ec89a832e0c31361a7b1d
parent73b98c7648c16583db4c59f24df5d3594c0b106a (diff)
downloadtxr-1a444721869bca8f94f1a5370b9d177444e35ea8.tar.gz
txr-1a444721869bca8f94f1a5370b9d177444e35ea8.tar.bz2
txr-1a444721869bca8f94f1a5370b9d177444e35ea8.zip
seq_info: bug: nil for objects with only length method.
* lib.c (seq_info): Add missing else, which makes the function return nil for objects that have a length method, but not a car method.
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index cba770b2..99284d9f 100644
--- a/lib.c
+++ b/lib.c
@@ -292,7 +292,7 @@ seq_info_t seq_info(val obj)
} else {
if (get_special_slot(obj, length_m))
ret.kind = SEQ_VECLIKE;
- if (get_special_slot(obj, car_m))
+ else if (get_special_slot(obj, car_m))
ret.kind = SEQ_LISTLIKE;
else
ret.kind = SEQ_NOTSEQ;