diff options
-rw-r--r-- | src/TgTypeParser.cpp | 1 | ||||
-rw-r--r-- | src/tools/StringTools.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/TgTypeParser.cpp b/src/TgTypeParser.cpp index f22a868..b52533b 100644 --- a/src/TgTypeParser.cpp +++ b/src/TgTypeParser.cpp @@ -603,6 +603,7 @@ std::string TgTypeParser::parseGenericReply(const GenericReply::Ptr& object) con } else if (dynamic_pointer_cast<InlineKeyboardMarkup>(object) != nullptr){ return parseInlineKeyboardMarkup(static_pointer_cast<InlineKeyboardMarkup>(object)); } + return ""; } InlineQuery::Ptr TgTypeParser::parseJsonAndGetInlineQuery(const boost::property_tree::ptree& data) const { diff --git a/src/tools/StringTools.cpp b/src/tools/StringTools.cpp index a48b4eb..ab7da46 100644 --- a/src/tools/StringTools.cpp +++ b/src/tools/StringTools.cpp @@ -80,7 +80,7 @@ string generateRandomString(size_t length) { static const string chars("qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890-=[]\\;',./!@#$%^&*()_+{}|:\"<>?`~"); static const size_t charsLen = chars.length(); string result; - for (int i = 0; i < length; ++i) { + for (size_t i = 0; i < length; ++i) { result += chars[rand() % charsLen]; } return result; |