From e63273fa2bd15a1b1d2153864c56e3bffa0fc162 Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Fri, 12 Jan 2024 16:29:05 +0800 Subject: [PATCH] fix out of range --- src/ulib/utils/utils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ulib/utils/utils.cpp b/src/ulib/utils/utils.cpp index 58a763f..3805fd7 100644 --- a/src/ulib/utils/utils.cpp +++ b/src/ulib/utils/utils.cpp @@ -18,7 +18,7 @@ StrJoin(std::vector &vec, if (iter == vec.cend()) { return ""; } std::stringstream ss; ss << *iter; - for (++iter; iter != iter + 1; ++iter) { + for (++iter; iter != vec.cend(); ++iter) { if (ignore_empty_str && iter->empty()) { continue; } ss << delimiter << *iter; }