From 6cb5be7813d4f7e9380929f900a6cbbb0e6756c6 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 1 Sep 2012 07:52:54 +0000 Subject: 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. --- read.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'read.c') diff --git a/read.c b/read.c index 33bf119..f075ef5 100644 --- a/read.c +++ b/read.c @@ -2242,9 +2242,9 @@ unescape_char (char *string, int c) /* 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++); -- cgit v1.2.3