Commit 96a18a9b authored by Matan Ziv-Av's avatar Matan Ziv-Av Committed by Kurt Hindenburg
Browse files

When an escape sequence is longer than the buffer, keep the last two chars.

Keeping only the last char is not enough, since we miss ST (ESC\) for the end of the sequence.
This fixes
parent 4661b005
Pipeline #157967 passed with stage
in 3 minutes and 59 seconds
......@@ -285,7 +285,10 @@ void Vt102Emulation::addArgument()
void Vt102Emulation::addToCurrentToken(uint cc)
tokenBufferPos = qMin(tokenBufferPos, MAX_TOKEN_LENGTH - 1);
if (tokenBufferPos == MAX_TOKEN_LENGTH) {
tokenBuffer[tokenBufferPos - 1] = tokenBuffer[tokenBufferPos];
tokenBuffer[tokenBufferPos] = cc;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment