From 2ee0ae2b8c21d5b1c2a77e06edf6a9883086a1ba Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 21 Dec 2014 22:09:55 +0300 Subject: Fix chat commands /store and /retreive without amount. --- src/utils/stringutils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); -- cgit v1.2.3-60-g2f50