mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-31 17:18:25 +00:00
read.c (unescape_char): Fix a thinko in the last change.
This commit is contained in:
parent
145661a541
commit
1820908804
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2012-09-09 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* read.c (unescape_char): Fix a thinko in the last change.
|
||||||
|
|
||||||
2012-09-09 Paul Smith <psmith@gnu.org>
|
2012-09-09 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
* default.c (default_variables): Use a correct default LIBPPATERNS
|
* default.c (default_variables): Use a correct default LIBPPATERNS
|
||||||
|
|
9
read.c
9
read.c
|
@ -2242,16 +2242,19 @@ unescape_char (char *string, int c)
|
||||||
l = e - s;
|
l = e - s;
|
||||||
|
|
||||||
if (*e != c || l%2 == 0)
|
if (*e != c || l%2 == 0)
|
||||||
/* It's not; just take it all without unescaping. */
|
{
|
||||||
memcpy (p, s, l);
|
/* It's not; just take it all without unescaping. */
|
||||||
|
memcpy (p, s, l);
|
||||||
|
p += l;
|
||||||
|
}
|
||||||
else if (l > 1)
|
else if (l > 1)
|
||||||
{
|
{
|
||||||
/* It is, and there's >1 backslash. Take half of them. */
|
/* It is, and there's >1 backslash. Take half of them. */
|
||||||
l /= 2;
|
l /= 2;
|
||||||
memcpy (p, s, l);
|
memcpy (p, s, l);
|
||||||
|
p += l;
|
||||||
}
|
}
|
||||||
s = e;
|
s = e;
|
||||||
p += l;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
*(p++) = *(s++);
|
*(p++) = *(s++);
|
||||||
|
|
Loading…
Reference in a new issue