[common] option: ignore non-typeable ascii characters

Under windows text editors like to default to saving in UTF8 with a byte
order mask prefix preventing proper parsing of any option that is on the
first line of the file. Since the configuration file is only intended to
be plain ascii this change ignores all non-ascii characters solving this
issue.
This commit is contained in:
Geoffrey McRae 2021-06-07 11:25:35 +10:00
parent 5c00f73d23
commit 44bff58aa8

View File

@ -397,6 +397,10 @@ bool option_load(const char * filename)
continue;
comment = false;
// ignore non-typeable ascii characters
if (c < 32 || c > 126)
continue;
switch(c)
{
case '[':