1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

config: Each backslash escapes only one character.

Previously, if you did this in elinks.conf:
set document.dump.header = "\'\\"
then str_rd() failed to detect the end of the string.
This commit is contained in:
Kalle Olavi Niemitalo 2008-01-30 22:56:00 +02:00 committed by Kalle Olavi Niemitalo
parent 9becd108a8
commit b216a21b79

View File

@ -248,9 +248,9 @@ str_rd(struct option *opt, unsigned char **file, int *line)
* thus we will never test for it in while () condition * thus we will never test for it in while () condition
* and we will treat it just as '"', ignoring the * and we will treat it just as '"', ignoring the
* backslash itself. */ * backslash itself. */
if (isquote(str[1])) str++; else if (isquote(str[1])) str++;
/* \\ means \. */ /* \\ means \. */
if (str[1] == '\\') str++; else if (str[1] == '\\') str++;
} }
if (*str == '\n') (*line)++; if (*str == '\n') (*line)++;