mirror of
https://git.savannah.gnu.org/git/make.git
synced 2024-11-25 04:35:44 +00:00
* read.c (unescape_char): Use memmove() for overlapping memory.
This commit is contained in:
parent
f8905059c3
commit
30b25acc4e
1 changed files with 2 additions and 2 deletions
4
read.c
4
read.c
|
@ -2343,14 +2343,14 @@ unescape_char (char *string, int c)
|
|||
if (*e != c || l%2 == 0)
|
||||
{
|
||||
/* It's not; just take it all without unescaping. */
|
||||
memcpy (p, s, l);
|
||||
memmove (p, s, l);
|
||||
p += l;
|
||||
}
|
||||
else if (l > 1)
|
||||
{
|
||||
/* It is, and there's >1 backslash. Take half of them. */
|
||||
l /= 2;
|
||||
memcpy (p, s, l);
|
||||
memmove (p, s, l);
|
||||
p += l;
|
||||
}
|
||||
s = e;
|
||||
|
|
Loading…
Reference in a new issue