aboutsummaryrefslogtreecommitdiff
path: root/cmd.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-10 20:01:12 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-10 20:01:12 +0000
commitdb8dff6814fd77c6cc86b9c0009b7afcdd95f196 (patch)
tree6cd4d72f59595ef16381de2d68ccffcb1280d52d /cmd.c
parentba35e8f2927c71a37dc423a4bed88a136ba99c0c (diff)
parentaa4de2d4b29fc7bdb15a207d44682a173ab874b6 (diff)
downloadrtmux-db8dff6814fd77c6cc86b9c0009b7afcdd95f196.tar.gz
rtmux-db8dff6814fd77c6cc86b9c0009b7afcdd95f196.tar.bz2
rtmux-db8dff6814fd77c6cc86b9c0009b7afcdd95f196.zip
Merge branch 'obsd-master'
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd.c b/cmd.c
index c4c35c0e..79a898ef 100644
--- a/cmd.c
+++ b/cmd.c
@@ -689,10 +689,14 @@ cmd_template_replace(const char *template, const char *s, int idx)
if (quoted)
ptr++;
- buf = xrealloc(buf, len + (strlen(s) * 2) + 1);
+ buf = xrealloc(buf, len + (strlen(s) * 3) + 1);
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';