diff options
author | shdown <shdownnine@gmail.com> | 2014-10-16 17:40:19 +0400 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-16 21:17:01 +0200 |
commit | dc5d60611ebdbf281ccffff1583e254610cf6f0a (patch) | |
tree | df61b0544394bd43c5a214db438cacecd3de96d6 /player | |
parent | df6ded7c947ca0cc96219cb67768fdaf75d67ff0 (diff) | |
download | mpv-dc5d60611ebdbf281ccffff1583e254610cf6f0a.tar.bz2 mpv-dc5d60611ebdbf281ccffff1583e254610cf6f0a.tar.xz |
player: quote %-starting strings
Leading percent sign is a quote indicator so it needs to be quoted
itself.
Diffstat (limited to 'player')
-rw-r--r-- | player/configfiles.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/player/configfiles.c b/player/configfiles.c index f7ab41cd72..bbc7ecc12a 100644 --- a/player/configfiles.c +++ b/player/configfiles.c @@ -266,6 +266,8 @@ void mp_get_resume_defaults(struct MPContext *mpctx) // Should follow what parser-cfg.c does/needs static bool needs_config_quoting(const char *s) { + if (s[0] == '%') + return true; for (int i = 0; s && s[i]; i++) { unsigned char c = s[i]; if (!mp_isprint(c) || mp_isspace(c) || c == '#' || c == '\'' || c == '"') |