summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2013-03-21 16:22:48 +0000
committernicm <nicm@openbsd.org>2013-03-21 16:22:48 +0000
commite55ca793f16bfed3ac63f9d31d3ee9e7f7ec76e3 (patch)
treee40ff285adc3196c8450de2f31aef235ae1e1b3f /usr.bin/tmux/cmd.c
parentNo more need for freefn. (diff)
downloadwireguard-openbsd-e55ca793f16bfed3ac63f9d31d3ee9e7f7ec76e3.tar.xz
wireguard-openbsd-e55ca793f16bfed3ac63f9d31d3ee9e7f7ec76e3.zip
Do not crash when calling choose-tree with a command that changes the mode.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index 484a5076785..b4e579ee60e 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.75 2013/03/21 16:19:25 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.76 2013/03/21 16:22:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1229,7 +1229,7 @@ cmd_template_replace(const char *template, const char *s, int idx)
int replaced;
size_t len;
- if (strstr(template, "%") == NULL)
+ if (strchr(template, '%') == NULL)
return (xstrdup(template));
buf = xmalloc(1);