diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-21 16:22:49 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2013-03-21 16:22:49 +0000 |
commit | 54ccf301e1a314e91d2066bc499ef384ceea4d28 (patch) | |
tree | 68d88068be35b0dee8999a2629c8c1b7f3cd9929 /usr.bin/tmux/cmd.c | |
parent | b495e3501461d24e0979c4d4d3d986fd12f28545 (diff) |
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.c | 4 |
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); |