summaryrefslogtreecommitdiff
path: root/read.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2012-09-09 20:33:58 +0000
committerEli Zaretskii <eliz@gnu.org>2012-09-09 20:33:58 +0000
commit1820908804cc775809d7b4269a6754eb4df957c9 (patch)
tree75a09e939cded8355885511342b4ecc253d1eff7 /read.c
parent145661a54151e13f05c86a526d7490e12ba79ed6 (diff)
downloadgunmake-1820908804cc775809d7b4269a6754eb4df957c9.tar.gz
read.c (unescape_char): Fix a thinko in the last change.
Diffstat (limited to 'read.c')
-rw-r--r--read.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/read.c b/read.c
index 8478c8d..d4bfb9c 100644
--- a/read.c
+++ b/read.c
@@ -2242,16 +2242,19 @@ unescape_char (char *string, int c)
l = e - s;
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)
{
/* It is, and there's >1 backslash. Take half of them. */
l /= 2;
memcpy (p, s, l);
+ p += l;
}
s = e;
- p += l;
}
*(p++) = *(s++);