From 2b20f8aaf4dddc20d223d7e0a9add1eca13f3c6f Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Wed, 29 Jan 2020 10:13:55 +0100 Subject: [PATCH] src/string.cpp: in strjoin() skip empty items. --- src/string.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/string.cpp b/src/string.cpp index eb8bb9f..8793fa1 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -51,6 +51,9 @@ std::string strjoin(const strlist_t& list, const std::string& delim) { std::string out; for(const std::string& item : list) { + if (item.length() < 1) { + continue; + } out += item + delim; }