mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Fix edge case
This commit is contained in:
@@ -166,7 +166,7 @@ public struct PeerId: Hashable, CustomStringConvertible, Comparable, Codable {
|
|||||||
let offsetIdHighBits = (data >> (32 + 3)) & 0xffffffff
|
let offsetIdHighBits = (data >> (32 + 3)) & 0xffffffff
|
||||||
let idHighBits = offsetIdHighBits << 32
|
let idHighBits = offsetIdHighBits << 32
|
||||||
|
|
||||||
if idHighBits == 0 {
|
if idHighBits == 0 && namespaceBits != 0 {
|
||||||
if let uint32Value = UInt32(exactly: idLowBits) {
|
if let uint32Value = UInt32(exactly: idLowBits) {
|
||||||
self.id = Id(rawValue: Int64(Int32(bitPattern: uint32Value)))
|
self.id = Id(rawValue: Int64(Int32(bitPattern: uint32Value)))
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user