From af9d4783a2abc1f8b99a6d2c7f8f57a32239af54 Mon Sep 17 00:00:00 2001 From: Janosch Hoffmann Date: Sun, 5 May 2019 09:38:57 +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..50d4bcc 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;