Fix a crash bug that occurred when the "Limit message height" setting was enabled and a message was being split up into multiple lines. IRC only. (#2329)

This commit is contained in:
pajlada 2021-01-02 14:49:03 +01:00 committed by GitHub
parent c64fd56831
commit d3b2ab1d8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View file

@ -60,6 +60,7 @@
- Bugfix: Fix a crash caused by FrankerFaceZ responding with invalid emote links (#2191)
- Bugfix: Fix a freeze caused by ignored & replaced phrases followed by Twitch Emotes (#2231)
- Bugfix: Fix a crash bug that occurred when moving splits across windows and closing the "parent tab" (#2249, #2259)
- Bugfix: Fix a crash bug that occurred when the "Limit message height" setting was enabled and a message was being split up into multiple lines. IRC only. (#2329)
- Dev: Updated minimum required Qt framework version to 5.12. (#2210)
- Dev: Migrated `Kraken::getUser` to Helix (#2260)
- Dev: Migrated `TwitchAccount::(un)followUser` from Kraken to Helix and moved it to `Helix::(un)followUser`. (#2306)

View file

@ -623,6 +623,11 @@ void IrcTextElement::addToContainer(MessageLayoutContainer &container,
// XXX(pajlada): NOT TESTED
for (int i = 0; i < textLength; i++)
{
if (!container.canAddElements())
{
break;
}
auto isSurrogate = text.size() > i + 1 &&
QChar::isHighSurrogate(text[i].unicode());