diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-01-11 10:08:32 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-01-11 10:08:32 -0800 |
commit | 384262e2f0effb4b7bbd2effa9311899fa253799 (patch) | |
tree | 5979c5ad1bc11d3b35942805630eaf7f60a29cc9 /lib.c | |
parent | b8b1c891f17d26cf3b13e77c1657cd855ae6543b (diff) | |
download | txr-384262e2f0effb4b7bbd2effa9311899fa253799.tar.gz txr-384262e2f0effb4b7bbd2effa9311899fa253799.tar.bz2 txr-384262e2f0effb4b7bbd2effa9311899fa253799.zip |
* lib.c (make_like): Bugfix. (make-like nil "abc")
must return the empty string, not nil. Only
lists of non-characters fail to convert to a string.
Since programs may depend on the hitherto wrong,
undocumented behavior, this is made subject to
compatibility.
* txr.1: Added compatibility note.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -504,6 +504,10 @@ val make_like(val list, val thatobj) case STR: case LIT: case LSTR: + if (!opt_compat || opt_compat > 101) { + if (!cdr(list)) + return null_string; + } if (is_chr(car(list))) return cat_str(list, nil); break; |