Fix crash

This commit is contained in:
isaac 2026-05-28 19:31:09 +02:00
parent a3131ba4d2
commit 55619c54f9

View file

@ -281,6 +281,9 @@ public func messageTextWithAttributes(message: EngineMessage) -> NSAttributedStr
}
let range = NSRange(location: entity.range.lowerBound, length: entity.range.upperBound - entity.range.lowerBound)
if range.upperBound >= updatedString.length {
continue
}
let currentDict = updatedString.attributes(at: range.lowerBound, effectiveRange: nil)
var updatedAttributes: [NSAttributedString.Key: Any] = currentDict