summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/stringutils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index 4aa8f5619..8af8ea547 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -765,7 +765,7 @@ uint32_t parseNumber(const std::string &str)
std::string removeToken(std::string &str, const std::string &token)
{
const size_t idx = str.find(token);
- if (idx > 0)
+ if (idx > 0 && idx != std::string::npos)
str = str.substr(idx + 1);
else
str.clear();