mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-07 16:11:13 +00:00
Fix overflow
This commit is contained in:
parent
b02a596dfb
commit
1a41f64f79
@ -14,7 +14,9 @@ public class AutoremoveTimeoutMessageAttribute: MessageAttribute {
|
|||||||
self.countdownBeginTime = countdownBeginTime
|
self.countdownBeginTime = countdownBeginTime
|
||||||
|
|
||||||
if let countdownBeginTime = countdownBeginTime {
|
if let countdownBeginTime = countdownBeginTime {
|
||||||
self.automaticTimestampBasedAttribute = (0, countdownBeginTime + timeout)
|
let result = Int64(countdownBeginTime) + Int64(timeout)
|
||||||
|
|
||||||
|
self.automaticTimestampBasedAttribute = (0, Int32(min(result, Int64(Int32.max - 1))))
|
||||||
} else {
|
} else {
|
||||||
self.automaticTimestampBasedAttribute = nil
|
self.automaticTimestampBasedAttribute = nil
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user