2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Allocate 64 bits for message ids.

This commit is contained in:
John Preston
2021-09-30 10:04:55 +04:00
parent 6adf791b3b
commit 1e660fc2a2
29 changed files with 337 additions and 162 deletions

View File

@@ -1838,8 +1838,8 @@ void Session::processMessages(
continue;
}
}
const auto id = IdFromMessage(message);
indices.emplace((uint64(uint32(id)) << 32) | uint64(i), i);
const auto id = IdFromMessage(message); // Only 32 bit values here.
indices.emplace((uint64(uint32(id.bare)) << 32) | uint64(i), i);
}
for (const auto &[position, index] : indices) {
addNewMessage(