diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-06-29 07:35:34 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-06-29 07:35:34 -0700 |
commit | 86fd2fab95618f6b097a80002da783f02a799d75 (patch) | |
tree | 3ef623bda9d40046e66cada14aab4f336c1da26c | |
parent | a0c6c03a650109060a111ba63f12454c4e1ca4d4 (diff) | |
download | txr-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |