fmtList.append(None);
QTextLayout::FormatRange curFmtRng;
curFmtRng.format = format(None);
+ curFmtRng.start = 0;
result.formats.append(curFmtRng);
int pos = 0; int length;
int fgCol = -1, bgCol = -1; // marks current mIRC color
QString code = QString("%") + s[pos+1];
if(s[pos+1] == 'D') code += s[pos+2];
FormatType ftype = formatType(code);
- Q_ASSERT(ftype != Invalid);
+ if(ftype == Invalid) {
+ qWarning(qPrintable(QString("Invalid format code in string: %1").arg(s)));
+ continue;
+ }
+ //Q_ASSERT(ftype != Invalid);
length = code.length();
if(!fmtList.contains(ftype)) {
// toggle it on