X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fmultilineedit.cpp;h=a9a2ae248a75532ed3594a25d225d628cef30bbf;hp=166e12cc460e82210c4bdc77ab2b37d517056503;hb=b359cfe9fdd2427993dc0b2f3f605fd69bbe6bd2;hpb=3e800ec6553158aa0da3b08da78083d587389914 diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 166e12cc..a9a2ae24 100644 --- a/src/uisupport/multilineedit.cpp +++ b/src/uisupport/multilineedit.cpp @@ -601,6 +601,10 @@ QString MultiLineEdit::convertMircCodesToHtml(const QString& text) } posRight = text.indexOf(mircCode.cap(), posRight + 1); + if (posRight == -1) { + words << text.mid(posLeft); + break; // unclosed color code; can't process + } words << text.mid(posLeft, posRight + 1 - posLeft); posLeft = posRight + 1; }