1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04: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.
(cherry picked from commit b216a21b79)
This commit is contained in:
Kalle Olavi Niemitalo 2008-01-30 22:56:00 +02:00 committed by Kalle Olavi Niemitalo
parent 50aea7c94b
commit 4e0e5cbcb3

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
* and we will treat it just as '"', ignoring the
* backslash itself. */
if (isquote(str[1])) str++;
else if (isquote(str[1])) str++;
/* \\ means \. */
if (str[1] == '\\') str++;
else if (str[1] == '\\') str++;
}
if (*str == '\n') (*line)++;