From bcd23ff971f15bad47f6c9c6da2702afdf87878a Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 3 Jan 2018 12:13:39 +0100 Subject: [PATCH] [string] Allow join to handle NULs --- src/builtin_string.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/builtin_string.cpp b/src/builtin_string.cpp index 4afcee0c5..cdfc1c6f9 100644 --- a/src/builtin_string.cpp +++ b/src/builtin_string.cpp @@ -656,12 +656,12 @@ static int string_join(parser_t &parser, io_streams_t &streams, int argc, wchar_ const wchar_t *sep = opts.arg1; int nargs = 0; arg_iterator_t aiter(argv, optind, streams); - while (const wchar_t *arg = aiter.next()) { + while (auto arg = aiter.nextstr()) { if (!opts.quiet) { if (nargs > 0) { streams.out.append(sep); } - streams.out.append(arg); + streams.out.append(*arg); } nargs++; }