diff --git a/src/cfgparse.c b/src/cfgparse.c index fdbf3a406..4ccca14d2 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1905,8 +1905,10 @@ next_line: readbytes = 0; - /* kill trailing LF */ - *(end - 1) = 0; + if (*(end-1) == '\n') { + /* kill trailing LF */ + *(end - 1) = 0; + } /* skip leading spaces */ while (isspace((unsigned char)*line))