aboutsummaryrefslogtreecommitdiff
path: root/tty-keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty-keys.c')
-rw-r--r--tty-keys.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tty-keys.c b/tty-keys.c
index 6dfa70f3..65b600c0 100644
--- a/tty-keys.c
+++ b/tty-keys.c
@@ -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++;