mirror of
https://github.com/tmux/tmux.git
synced 2025-04-22 12:28:48 +00:00
Only copy the key string not two bytes extra, found by David Mandelberg.
This commit is contained in:
parent
ef0c12ad9e
commit
f41dc91357
@ -1061,8 +1061,8 @@ tty_keys_extended_key(struct tty *tty, const char *buf, size_t len,
|
|||||||
return (-1);
|
return (-1);
|
||||||
|
|
||||||
/* Copy to the buffer. */
|
/* Copy to the buffer. */
|
||||||
memcpy(tmp, buf + 2, end);
|
memcpy(tmp, buf + 2, end - 2);
|
||||||
tmp[end] = '\0';
|
tmp[end - 2] = '\0';
|
||||||
|
|
||||||
/* Try to parse either form of key. */
|
/* Try to parse either form of key. */
|
||||||
if (buf[end] == '~') {
|
if (buf[end] == '~') {
|
||||||
|
Loading…
Reference in New Issue
Block a user