Merge pull request #33 from code1mountain/crash-fix

Fix crash with service messages
This commit is contained in:
giuseppeM99 2020-12-24 22:24:46 +01:00 committed by GitHub
commit 00655e474d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9501,7 +9501,7 @@ td::int64 Client::as_tdlib_message_id(int32 message_id) {
td::int32 Client::as_client_message_id(int64 message_id) { td::int32 Client::as_client_message_id(int64 message_id) {
int32 result = static_cast<int32>(message_id >> 20); int32 result = static_cast<int32>(message_id >> 20);
CHECK(as_tdlib_message_id(result) == message_id); CHECK(as_tdlib_message_id(result) >> 2 == message_id >> 2);
return result; return result;
} }