From 54ccf301e1a314e91d2066bc499ef384ceea4d28 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 21 Mar 2013 16:22:49 +0000 Subject: Do not crash when calling choose-tree with a command that changes the mode. --- usr.bin/tmux/cmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/tmux/cmd.c') 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 @@ -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); -- cgit v1.2.3