artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de5b078
)
Reduce len when moving past spaces in OSC 11 parameter.
author
nicm
<nicm@openbsd.org>
Thu, 18 Feb 2021 13:30:24 +0000
(13:30 +0000)
committer
nicm
<nicm@openbsd.org>
Thu, 18 Feb 2021 13:30:24 +0000
(13:30 +0000)
usr.bin/tmux/input.c
patch
|
blob
|
history
diff --git
a/usr.bin/tmux/input.c
b/usr.bin/tmux/input.c
index
cbf25b2
..
0ce7a65
100644
(file)
--- a/
usr.bin/tmux/input.c
+++ b/
usr.bin/tmux/input.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: input.c,v 1.18
7 2021/02/15 14:22:35
nicm Exp $ */
+/* $OpenBSD: input.c,v 1.18
8 2021/02/18 13:30:24
nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@
-2460,8
+2460,10
@@
input_osc_parse_colour(const char *p)
(1 - m) * (1 - k) * 255,
(1 - y) * (1 - k) * 255);
} else {
- while (
*p == ' ')
+ while (
len != 0 && *p == ' ') {
p++;
+ len--;
+ }
while (len != 0 && p[len - 1] == ' ')
len--;
copy = xstrndup(p, len);