From: Eli Zaretskii Date: Sun, 9 Sep 2012 20:33:58 +0000 (+0000) Subject: read.c (unescape_char): Fix a thinko in the last change. X-Git-Tag: moved-to-git~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1820908804cc775809d7b4269a6754eb4df957c9;p=thirdparty%2Fmake.git read.c (unescape_char): Fix a thinko in the last change. --- diff --git a/ChangeLog b/ChangeLog index fefd2850..786f438f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2012-09-09 Eli Zaretskii + + * read.c (unescape_char): Fix a thinko in the last change. + 2012-09-09 Paul Smith * default.c (default_variables): Use a correct default LIBPPATERNS diff --git a/read.c b/read.c index 8478c8d7..d4bfb9c3 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++);