allow '%' escape; treat anything else as error

This commit is contained in:
Pierangelo Masarati 2003-12-29 15:10:59 +00:00
parent 0549d46adf
commit 748e144a16

View File

@ -160,6 +160,16 @@ rewrite_subst_compile(
submatch[ nsub ].ls_type =
REWRITE_SUBMATCH_MAP_W_ARG;
submatch[ nsub ].ls_map = map;
/*
* Escape '%' ...
*/
} else if ( p[ 1 ] == '%' ) {
AC_MEMCPY( &p[ 1 ], &p[ 2 ], strlen( &p[ 1 ] ) );
continue;
} else {
return NULL;
}
nsub++;