config: skip BOM

This commit is contained in:
wm4 2014-07-12 21:24:55 +02:00
parent 5b820ff1b4
commit fed69f3637
1 changed files with 4 additions and 0 deletions

View File

@ -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;