mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-01-30 16:41:44 +00:00
Fix unescape_char when not unescaping.
read.c (unescape_char): Advance 'p' after copying the unescaped characters. Otherwise the backslashes are incorrectly erased from the original string.
This commit is contained in:
parent
adb50bd4c9
commit
6cb5be7813
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2012-09-01 Eli Zaretskii <eliz@gnu.org>
|
||||||
|
|
||||||
|
* read.c (unescape_char): Advance 'p' after copying the unescaped
|
||||||
|
characters. Otherwise the backslashes are incorrectly erased from
|
||||||
|
the original string.
|
||||||
|
|
||||||
2012-03-05 Paul Smith <psmith@gnu.org>
|
2012-03-05 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
Update copyright notices to use year ranges, as allowed by
|
Update copyright notices to use year ranges, as allowed by
|
||||||
|
|
2
read.c
2
read.c
|
@ -2242,9 +2242,9 @@ unescape_char (char *string, int c)
|
||||||
/* 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