diff options
author | wm4 <wm4@nowhere> | 2014-07-12 21:24:55 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-07-12 21:24:55 +0200 |
commit | fed69f3637965ea92c23b5e41e56bc9dae37efb9 (patch) | |
tree | 7ec8d8166c1c1b5e63eb6302b403134599263794 /options/parse_configfile.c | |
parent | 5b820ff1b42a52aa44e9b19974f7b78eead6eba6 (diff) | |
download | mpv-fed69f3637965ea92c23b5e41e56bc9dae37efb9.tar.bz2 mpv-fed69f3637965ea92c23b5e41e56bc9dae37efb9.tar.xz |
config: skip BOM
Diffstat (limited to 'options/parse_configfile.c')
-rw-r--r-- | options/parse_configfile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/options/parse_configfile.c b/options/parse_configfile.c index 112a26b115..01d5f41b9f 100644 --- a/options/parse_configfile.c +++ b/options/parse_configfile.c @@ -94,6 +94,10 @@ int m_config_parse_config_file(m_config_t *config, const char *conffile, line_num++; line_pos = 0; + /* skip BOM */ + if (strncmp(line, "\xEF\xBB\xBF", 3) == 0) + line_pos += 3; + /* skip whitespaces */ while (mp_isspace(line[line_pos])) ++line_pos; |