mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
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.
This commit is contained in:
parent
61019c3130
commit
76d803bbb9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user