From ef7ed37e3ebc6f038e13f0157e8c46d1c2df76a8 Mon Sep 17 00:00:00 2001 From: Mathias Schnarrenberger Date: Mon, 5 Apr 2021 14:11:01 +0200 Subject: Fixes https://github.com/reo7sp/tgbot-cpp/issues/162 --- src/tools/StringTools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tools') diff --git a/src/tools/StringTools.cpp b/src/tools/StringTools.cpp index 8b8f4da..653047c 100644 --- a/src/tools/StringTools.cpp +++ b/src/tools/StringTools.cpp @@ -56,7 +56,8 @@ void split(const string& str, char delimiter, vector& dest) { } string generateRandomString(std::size_t length) { - static const string chars("qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890-=[]\\;',./!@#$%^&*()_+{}|:\"<>?`~"); + static const string chars("qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890-=[]\\',./!@#$%^&*()_+{}|:\"<>?`~"); + static const std::size_t charsLen = chars.length(); string result; -- cgit v1.2.3