summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 11d9cf2f..43a0b236 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2015-01-27 Kaz Kylheku <kaz@kylheku.com>
+ * lib.c (make_like): Fix regression introduced in 102.
+ A one element list being converted to a string
+ treated as an empty list, leading to empty string.
+
+2015-01-27 Kaz Kylheku <kaz@kylheku.com>
+
* arith.c (width): New function.
* arith.h (width): Declared.
diff --git a/lib.c b/lib.c
index 7c857423..e971ef1f 100644
--- a/lib.c
+++ b/lib.c
@@ -505,7 +505,7 @@ val make_like(val list, val thatobj)
case LIT:
case LSTR:
if (!opt_compat || opt_compat > 101) {
- if (!cdr(list))
+ if (!list)
return null_string;
}
if (is_chr(car(list)))