From 76d803bbb9aa0e26810bf81f3600e31ec3f7de06 Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Sun, 10 Feb 2008 14:30:26 +0200 Subject: [PATCH] config: Count backslashed newlines in str_rd. If a newline has a backslash in front of it, then str_rd replaces it with a space. However, the newline was in the original config file, so the line number must still be incremented. --- src/config/opttypes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/opttypes.c b/src/config/opttypes.c index 72e23c968..e79e42f0b 100644 --- a/src/config/opttypes.c +++ b/src/config/opttypes.c @@ -282,7 +282,7 @@ str_rd(struct option *opt, unsigned char **file, int *line) while (*str && (commandline || !isquote(*str))) { if (*str == '\\') { /* FIXME: This won't work on crlf systems. */ - if (str[1] == '\n') { str[1] = ' '; str++; } + if (str[1] == '\n') { str[1] = ' '; str++; (*line)++; } /* When there's quote char, we will just move on there, * thus we will never test for it in while () condition * and we will treat it just as '"', ignoring the