From 3753d8535ec714cde5554f09cf900ca6ff4959b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kubern=C3=A1t?= Date: Mon, 21 Oct 2024 15:49:46 +0200 Subject: [PATCH] core/utils: Fix comparing iterators from different instances --- libshvcore/src/utils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libshvcore/src/utils.cpp b/libshvcore/src/utils.cpp index 99c63c08e..2df680d03 100644 --- a/libshvcore/src/utils.cpp +++ b/libshvcore/src/utils.cpp @@ -191,8 +191,8 @@ StringViewList utils::split(StringView strv, char delim, char quote, SplitBehavi ret.push_back(token); } } - //if(token.end() >= strv.end()) - // break; + if(token.data() + token.size() >= strv.data() + strv.size()) + break; strv = strv.substr(token.length() + 1); } return ret;