From 72a2bbbfb72321e2cf05f31b10294c5597890005 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Sat, 29 Aug 2009 13:08:46 +0530 Subject: Backslash-escape /s in the target of a generated s/// expression Fixes #68840 reported by Guglielmo Bondioni, where a2p incorrectly translated sub(/foo/,"bar/baz") into s/foo/bar/baz/. --- x2p/walk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'x2p') diff --git a/x2p/walk.c b/x2p/walk.c index ef754c59df..d3d5f9189d 100644 --- a/x2p/walk.c +++ b/x2p/walk.c @@ -845,7 +845,7 @@ sub Pick {\n\ for (t = tmp2str->str_ptr, d=tokenbuf; *t; d++,t++) { if (*t == '&') *d++ = '$' + (char)128; - else if (*t == '$') + else if (*t == '$' || *t == '/') *d++ = '\\' + (char)128; *d = *t + 128; } -- cgit v1.2.1