mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Various Fixes
This commit is contained in:
@@ -69,7 +69,9 @@ public func stringWithAppliedEntities(_ text: String, entities: [MessageTextEnti
|
||||
if nsString == nil {
|
||||
nsString = text as NSString
|
||||
}
|
||||
if range.location + range.length > stringLength {
|
||||
if range.location > stringLength {
|
||||
continue
|
||||
} else if range.location + range.length > stringLength {
|
||||
range.location = max(0, stringLength - range.length)
|
||||
range.length = stringLength - range.location
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user