Do not crash when calling choose-tree with a command that changes the mode.

This commit is contained in:
Nicholas Marriott
2013-02-13 11:01:26 +00:00
parent f4c815a1d9
commit 362c460767
2 changed files with 15 additions and 11 deletions

2
cmd.c
View File

@@ -1228,7 +1228,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);