From b99a45bbf8ca83f77725735feec548bbb7bb371c Mon Sep 17 00:00:00 2001 From: Jannik <32801117+code1mountain@users.noreply.github.com> Date: Wed, 23 Dec 2020 17:36:12 +0100 Subject: [PATCH] Fix crash with service messages --- telegram-bot-api/Client.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram-bot-api/Client.cpp b/telegram-bot-api/Client.cpp index ac6370d..8058667 100644 --- a/telegram-bot-api/Client.cpp +++ b/telegram-bot-api/Client.cpp @@ -9501,7 +9501,7 @@ td::int64 Client::as_tdlib_message_id(int32 message_id) { td::int32 Client::as_client_message_id(int64 message_id) { int32 result = static_cast(message_id >> 20); - CHECK(as_tdlib_message_id(result) == message_id); + CHECK(as_tdlib_message_id(result) >> 2 == message_id >> 2); return result; }