From 5db72c0b434a7788a66c455d2befe538f91e52b1 Mon Sep 17 00:00:00 2001 From: Alessandro Mauri Date: Tue, 28 Jul 2020 13:33:12 +0200 Subject: [PATCH] fix comment bug comments not at the beginning of the line are no longer ignored --- hkd.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hkd.c b/hkd.c index d0189ab..17f279f 100644 --- a/hkd.c +++ b/hkd.c @@ -634,6 +634,10 @@ void parse_config_file (void) free(line); continue; } + for (size_t i = 1; i < linelen; i++) { + if (line[i] == '#') + line[i] = '\0'; + } // TODO: multiline commands, ending with "\\n" // TODO: better error checks in order to remove unnecessary