diff options
author | nicm <nicm> | 2019-08-29 07:13:48 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2019-09-16 08:59:49 +0100 |
commit | c45b255a885f36e033e1dfba1776fb5c04bfb6cf (patch) | |
tree | 1e0d8d5da7405dd8e31d6bb2339feedd441d0e4c | |
parent | 5e4f3714084dc3edcc8f5e9bfcc86faeb92d900a (diff) | |
download | rtmux-c45b255a885f36e033e1dfba1776fb5c04bfb6cf.tar.gz rtmux-c45b255a885f36e033e1dfba1776fb5c04bfb6cf.tar.bz2 rtmux-c45b255a885f36e033e1dfba1776fb5c04bfb6cf.zip |
It is not longer necessary to double-escape ; in %%%, problem reported
by Theo Buehler.
-rw-r--r-- | cmd.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -660,7 +660,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; @@ -691,10 +691,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'; |