Abort parsing of APC and PM escape codes on 0x00 and 0x7f

Correct as per ECMA-48 section 8.3 and matches parsing of other escape
codes
This commit is contained in:
Kovid Goyal 2021-04-15 12:57:58 +05:30
parent e6ccc2d178
commit 6179cfc670
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1127,6 +1127,9 @@ accumulate_oth(Screen *screen, uint32_t ch, PyObject DUMP_UNUSED *dump_callback)
switch(ch) {
case ST:
return true;
case DEL:
case NUL:
break;
case ESC_ST:
if (screen->parser_buf_pos > 0 && screen->parser_buf[screen->parser_buf_pos - 1] == ESC) {
screen->parser_buf_pos--;