diff options
author | nicm <nicm> | 2021-10-21 08:36:51 +0000 |
---|---|---|
committer | nicm <nicm> | 2021-10-21 08:36:51 +0000 |
commit | 289ac55ebde18df237ad21734ba4056896d11022 (patch) | |
tree | 022c57716458da448676d925788fe5595dcb141b /tty-keys.c | |
parent | 7bd9cdf6fcf43e0edc8ab3a4accf2009ca5aa35e (diff) |
Correctly adjust the end pointer for a two character terminator before
decoding OSC 52 response, from Daniel Ekloef in GitHub issue 2942.
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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++; |