mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-22 21:43:40 +00:00
[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:
parent
5c00f73d23
commit
44bff58aa8
@ -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 '[':
|
||||
|
Loading…
Reference in New Issue
Block a user