summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-29 07:35:34 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-29 07:35:34 -0700
commit86fd2fab95618f6b097a80002da783f02a799d75 (patch)
tree3ef623bda9d40046e66cada14aab4f336c1da26c
parenta0c6c03a650109060a111ba63f12454c4e1ca4d4 (diff)
downloadtxr-86fd2fab95618f6b097a80002da783f02a799d75.tar.gz
txr-86fd2fab95618f6b097a80002da783f02a799d75.tar.bz2
txr-86fd2fab95618f6b097a80002da783f02a799d75.zip
path-cat: error if arguments are not strings.
* stream.c (path_cat): Use length_str to enforce a type check. Otherwise, for instance, (path-cat #() "foo") will return "foo".
-rw-r--r--stream.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stream.c b/stream.c
index e4670e10..cb853d98 100644
--- a/stream.c
+++ b/stream.c
@@ -5079,8 +5079,8 @@ val long_suffix(val name, val alt_in)
val path_cat(val dir_name, val base_name)
{
- val dl = length(dir_name);
- val bl = length(base_name);
+ val dl = length_str(dir_name);
+ val bl = length_str(base_name);
val ps = static_str(path_sep_chars);
if (dl == zero)