From: Alexander von Renteln Date: Wed, 16 Jan 2008 11:03:08 +0000 (+0000) Subject: Make Quassel not crash on color codes > 15 (Sput) X-Git-Tag: 0.2.0-alpha1~228 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=ff6a8ed14fad421991b7c9998582b9f5df6912dc Make Quassel not crash on color codes > 15 (Sput) --- diff --git a/src/uisupport/uistyle.cpp b/src/uisupport/uistyle.cpp index f0ff8c06..5f46331f 100644 --- a/src/uisupport/uistyle.cpp +++ b/src/uisupport/uistyle.cpp @@ -156,6 +156,8 @@ UiStyle::StyledText UiStyle::styleString(QString s) { length = 4; } else { int color = 10 * s[pos+4].digitValue() + s[pos+5].digitValue(); + //TODO: use 99 as transparent color (re mirc color "standard") + color &= 0x0f; int *colptr; FormatType coltype; if(s[pos+3] == 'f') { // foreground colptr = &fgCol; coltype = FgCol00;