From 511e8b606f99214bd6099adf981842abbfef0ba7 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 25 Aug 2001 15:20:16 +0000 Subject: [PATCH] fix bug in '%' escaping in substitution pattern compile --- libraries/librewrite/subst.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libraries/librewrite/subst.c b/libraries/librewrite/subst.c index 2f0645f6d4..3047cd2657 100644 --- a/libraries/librewrite/subst.c +++ b/libraries/librewrite/subst.c @@ -57,7 +57,9 @@ rewrite_subst_compile( */ if ( p[ 0 ] != REWRITE_SUBMATCH_ESCAPE ) { continue; - } else if ( p[ 1 ] == REWRITE_SUBMATCH_ESCAPE ) { + } + if ( p[ 1 ] == REWRITE_SUBMATCH_ESCAPE ) { + memmove(p, p + 1, strlen( p ) ); continue; } -- 2.39.5