X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fuisupport%2Fmultilineedit.cpp;h=1ecba1032d9fcb242a530fe0e024096e5216fc31;hb=c0d6dc0dec628f2e143e37ecc95cec45e636f8a5;hp=6bc549e18ee4a2493c16dab2cc1793378e5cbbd5;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;p=quassel.git diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 6bc549e1..1ecba103 100644 --- a/src/uisupport/multilineedit.cpp +++ b/src/uisupport/multilineedit.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2020 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -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; }