X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fuisupport%2Fmultilineedit.cpp;h=a9a2ae248a75532ed3594a25d225d628cef30bbf;hp=6bc549e18ee4a2493c16dab2cc1793378e5cbbd5;hb=b359cfe9fdd2427993dc0b2f3f605fd69bbe6bd2;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650 diff --git a/src/uisupport/multilineedit.cpp b/src/uisupport/multilineedit.cpp index 6bc549e1..a9a2ae24 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-2019 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; }