player: quote %-starting strings

Leading percent sign is a quote indicator so it needs to be quoted
itself.
This commit is contained in:
shdown
2014-10-18 15:04:54 +02:00
committed by Alessandro Ghedini
parent 919540ce8e
commit 3fae6aaae8
+2
View File
@@ -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 == '"')