mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-27 13:58:08 +08:00
player: quote %-starting strings
Leading percent sign is a quote indicator so it needs to be quoted itself.
This commit is contained in:
committed by
Alessandro Ghedini
parent
919540ce8e
commit
3fae6aaae8
@@ -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 == '"')
|
||||
|
||||
Reference in New Issue
Block a user