mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-15 13:35:19 +00:00
Maybe there is an overflow?
This commit is contained in:
parent
c6ac56a6ae
commit
3f013d9448
@ -88,8 +88,8 @@ struct Month: Equatable {
|
||||
var timeinfo: tm = tm()
|
||||
gmtime_r(&time, &timeinfo)
|
||||
|
||||
let year = UInt32(timeinfo.tm_year)
|
||||
let month = UInt32(timeinfo.tm_mon)
|
||||
let year = UInt32(max(timeinfo.tm_year, 0))
|
||||
let month = UInt32(max(timeinfo.tm_mon, 0))
|
||||
|
||||
self.packedValue = Int32(bitPattern: year | (month << 16))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user