From: Pierangelo Masarati Date: Sat, 25 Aug 2001 15:20:16 +0000 (+0000) Subject: fix bug in '%' escaping in substitution pattern compile X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1158 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=511e8b606f99214bd6099adf981842abbfef0ba7;p=openldap fix bug in '%' escaping in substitution pattern compile --- 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; }