]> git.sur5r.net Git - openldap/commitdiff
fix bug in '%' escaping in substitution pattern compile
authorPierangelo Masarati <ando@openldap.org>
Sat, 25 Aug 2001 15:20:16 +0000 (15:20 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 25 Aug 2001 15:20:16 +0000 (15:20 +0000)
libraries/librewrite/subst.c

index 2f0645f6d4c790c2b17f3fa1b7275f48d7761865..3047cd2657272afb25dd6815631b2835247a13c3 100644 (file)
@@ -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;
                }