From c0f8ab8da0f58b7b167a68a37e5d044c237d9e4d Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 18 Jul 2019 21:52:13 +0200 Subject: [PATCH] Fix build for old Qt version. --- Telegram/SourceFiles/core/utils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/core/utils.cpp b/Telegram/SourceFiles/core/utils.cpp index 5e2ed45af4..f2f80afd30 100644 --- a/Telegram/SourceFiles/core/utils.cpp +++ b/Telegram/SourceFiles/core/utils.cpp @@ -148,8 +148,9 @@ std::atomic GlobalAtomicRequestId = 0; && (code != '-'); }; const auto inner = Base64UrlInner(password); - const auto i = std::find_if(inner.begin(), inner.end(), bad); - return (i == inner.end()); + const auto begin = inner.data(); + const auto end = begin + inner.size(); + return (std::find_if(begin, end, bad) == end); } [[nodiscard]] ProxyData::Status Base64UrlMtprotoPasswordStatus(