Correctly adjust the end pointer for a two character terminator before

decoding OSC 52 response, from Daniel Ekloef in GitHub issue 2942.
pull/2931/head^2^2
nicm 2021-10-21 08:36:51 +00:00
parent 7bd9cdf6fc
commit 289ac55ebd
1 changed files with 3 additions and 0 deletions

View File

@ -1204,6 +1204,9 @@ tty_keys_clipboard(__unused struct tty *tty, const char *buf, size_t len,
buf += 5;
end -= 5;
/* Adjust end so that it points to the start of the terminator. */
end -= terminator - 1;
/* Get the second argument. */
while (end != 0 && *buf != ';') {
buf++;