From 10d36d48a4d08206d7835ca4248bb3111b01ec2f Mon Sep 17 00:00:00 2001 From: Janosch Hoffmann Date: Sun, 5 May 2019 10:24:52 +0200 Subject: [PATCH] filter: Don't ignore lines with leading whitespace This patch is related to parsing the filter file. The new code skips leading whitespaces before removing trailing whitespaces and comments. Without doing this, lines with leading whitespace are treated like empty lines (i.e. they are ignored). --- src/filter.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/filter.c b/src/filter.c index 3164191..6a932d1 100644 --- a/src/filter.c +++ b/src/filter.c @@ -78,6 +78,9 @@ void filter_init (void) * comments. */ s = buf; + /* skip leading whitespace */ + while (*s && isspace ((unsigned char) *s)) + ++s; while (*s) { if (isspace ((unsigned char) *s)) break;