From 21d86dd31d55af99d6206bf208e84f8eb1194f1a Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 7 Jun 2021 11:29:17 +1000 Subject: [PATCH] [common] option: prevent ascii filter from eating newlines --- common/src/option.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/common/src/option.c b/common/src/option.c index 20ef67bf..0be570b5 100644 --- a/common/src/option.c +++ b/common/src/option.c @@ -397,10 +397,6 @@ bool option_load(const char * filename) continue; comment = false; - // ignore non-typeable ascii characters - if (c < 32 || c > 126) - continue; - switch(c) { case '[': @@ -508,6 +504,10 @@ bool option_load(const char * filename) // fallthrough default: + // ignore non-typeable ascii characters + if (c < 32 || c > 126) + continue; + if (expectLine) { DEBUG_ERROR("Syntax error on line %d, expected new line", lineno);