summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/status.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2019-04-23 20:40:04 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2019-04-23 20:40:04 +0000
commit8e37ccc9900c4135402b544388ef40a0b8686875 (patch)
tree913b0d8d88e6033c03d555e41e137b9ec945c4ec /usr.bin/tmux/status.c
parentce983935cc23e33b6a524267973a0db5c29a4e26 (diff)
Somehow missed these bits in last commit.
Diffstat (limited to 'usr.bin/tmux/status.c')
-rw-r--r--usr.bin/tmux/status.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c
index 143e445c3b1..958ac0eddc2 100644
--- a/usr.bin/tmux/status.c
+++ b/usr.bin/tmux/status.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: status.c,v 1.193 2019/04/23 20:36:55 nicm Exp $ */
+/* $OpenBSD: status.c,v 1.194 2019/04/23 20:40:03 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1293,6 +1293,7 @@ status_prompt_complete_list(u_int *size, const char *s)
size_t slen = strlen(s), valuelen;
struct options_entry *o;
struct options_array_item *a;
+ union options_value *ov;
const char *layouts[] = {
"even-horizontal", "even-vertical", "main-horizontal",
"main-vertical", "tiled", NULL
@@ -1321,10 +1322,13 @@ status_prompt_complete_list(u_int *size, const char *s)
if (o != NULL) {
a = options_array_first(o);
while (a != NULL) {
- value = options_array_item_value(a);;
- if (value == NULL || (cp = strchr(value, '=')) == NULL)
+ ov = options_array_item_value(a);
+ if (ov == NULL)
goto next;
+ value = ov->string;
+ if ((cp = strchr(value, '=')) == NULL)
+ goto next;
valuelen = cp - value;
if (slen > valuelen || strncmp(value, s, slen) != 0)
goto next;