From fed69f3637965ea92c23b5e41e56bc9dae37efb9 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 12 Jul 2014 21:24:55 +0200 Subject: config: skip BOM --- options/parse_configfile.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3