From e8a58c4c8dada475b93cf3a96449dc3697003905 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 30 Sep 2020 21:03:03 +0300 Subject: [PATCH] Fix crash in replies list management. --- Telegram/SourceFiles/data/data_replies_list.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/data/data_replies_list.cpp b/Telegram/SourceFiles/data/data_replies_list.cpp index 41f89426cf..759b159da4 100644 --- a/Telegram/SourceFiles/data/data_replies_list.cpp +++ b/Telegram/SourceFiles/data/data_replies_list.cpp @@ -551,7 +551,7 @@ bool RepliesList::processMessagesIsEmpty(const MTPmessages_Messages &result) { *correct = std::max( checkedCount - *decrementFrom - nowSize, 0); - *decrementFrom = *_fullCount.current() - *correct - nowSize; + *decrementFrom = checkedCount - *correct - nowSize; Assert(*decrementFrom >= 0); } else if (_skippedBefore) { *_skippedBefore = std::min(*_skippedBefore, checkedCount - nowSize);