From 3fae6aaae80026c5601c1956e46c07fcb65d0a68 Mon Sep 17 00:00:00 2001 From: shdown Date: Thu, 16 Oct 2014 17:40:19 +0400 Subject: player: quote %-starting strings Leading percent sign is a quote indicator so it needs to be quoted itself. --- player/configfiles.c | 2 ++ 1 file changed, 2 insertions(+) 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 == '"') -- cgit v1.2.3