]> git.sur5r.net Git - openldap/blobdiff - libraries/librewrite/subst.c
Fix up abandon merge. Hallvard will holler if I get this wrong. :-)
[openldap] / libraries / librewrite / subst.c
index b85a7560bd59ec68e64b0de092c924e181f7436e..4c0bc411e0fa627c0d77084e2a116da33c635f06 100644 (file)
@@ -53,13 +53,13 @@ rewrite_subst_compile(
        for ( p = begin = result, subs_len = 0; p[ 0 ] != '\0'; p++ ) {
                
                /*
-                * Keep only single escapes '\'
+                * Keep only single escapes '%'
                 */
                if ( p[ 0 ] != REWRITE_SUBMATCH_ESCAPE ) {
                        continue;
                } 
                if ( p[ 1 ] == REWRITE_SUBMATCH_ESCAPE ) {
-                       memmove((char *)p, p + 1, strlen( p ) );
+                       AC_MEMCPY((char *)p, p + 1, strlen( p ) );
                        continue;
                }
 
@@ -101,7 +101,7 @@ rewrite_subst_compile(
                /*
                 * Substitution pattern
                 */
-               if ( isdigit( p[ 1 ] ) ) {
+               if ( isdigit( (unsigned char) p[ 1 ] ) ) {
                        int d = p[ 1 ] - '0';
                        struct rewrite_submatch **tmpsm;