diff --git a/terminal.cpp b/terminal.cpp index 1134413..7bc0c98 100644 --- a/terminal.cpp +++ b/terminal.cpp @@ -750,8 +750,8 @@ void Terminal::ansiSequence(const QString& seq) // xterm 256-colour support if(params.count() > 1 && (params[0] == 38 || params[0] == 48)) { if(params.count() > 2 && params[1] == 5 && - params[2] >= 0 && params[2] <= 255) { - if (params[0] == 38) + params[2] >= 0 && params[2] <= 255) { + if(params[0] == 38) iTermAttribs.currentFgColor = params[2]; else iTermAttribs.currentBgColor = params[2]; diff --git a/textrender.cpp b/textrender.cpp index 59d8e0f..ce14d01 100644 --- a/textrender.cpp +++ b/textrender.cpp @@ -55,10 +55,9 @@ TextRender::TextRender(QQuickItem *parent) : //colour cube for (int r = 0x00; r < 0x100; r += 0x33) - for (int g = 0x00; g < 0x100; g += 0x33) - for (int b = 0x00; b < 0x100; b += 0x33) { - iColorTable.append(QColor(r, g, b)); - } + for (int g = 0x00; g < 0x100; g += 0x33) + for (int b = 0x00; b < 0x100; b += 0x33) + iColorTable.append(QColor(r, g, b)); //greyscale ramp int ramp[] = {