summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-08-29 07:13:48 +0000
committernicm <nicm@openbsd.org>2019-08-29 07:13:48 +0000
commit2cdc511bd4b869f5c177c24f607cddd836ed9470 (patch)
tree842ce3d33ee2fadaa3cc90e051962335f811cfca /usr.bin/tmux/cmd.c
parentFix wrong comment about MIDI port hold flag (diff)
downloadwireguard-openbsd-2cdc511bd4b869f5c177c24f607cddd836ed9470.tar.xz
wireguard-openbsd-2cdc511bd4b869f5c177c24f607cddd836ed9470.zip
It is not longer necessary to double-escape ; in %%%, problem reported
by Theo Buehler.
Diffstat (limited to 'usr.bin/tmux/cmd.c')
-rw-r--r--usr.bin/tmux/cmd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.bin/tmux/cmd.c b/usr.bin/tmux/cmd.c
index 13386ee212d..54b0d23eba1 100644
--- a/usr.bin/tmux/cmd.c
+++ b/usr.bin/tmux/cmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd.c,v 1.153 2019/07/06 20:56:34 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.154 2019/08/29 07:13:48 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -661,7 +661,7 @@ char *
cmd_template_replace(const char *template, const char *s, int idx)
{
char ch, *buf;
- const char *ptr, *cp, quote[] = "\"\\$";
+ const char *ptr, *cp, quote[] = "\"\\$;";
int replaced, quoted;
size_t len;
@@ -692,10 +692,6 @@ cmd_template_replace(const char *template, const char *s, int idx)
for (cp = s; *cp != '\0'; cp++) {
if (quoted && strchr(quote, *cp) != NULL)
buf[len++] = '\\';
- if (quoted && *cp == ';') {
- buf[len++] = '\\';
- buf[len++] = '\\';
- }
buf[len++] = *cp;
}
buf[len] = '\0';