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; }