diff --git a/ext/misc/regexp.c b/ext/misc/regexp.c index 54c505233d..8a3e13115f 100644 --- a/ext/misc/regexp.c +++ b/ext/misc/regexp.c @@ -568,6 +568,7 @@ static const char *re_subcompile_string(ReCompiled *p){ if( m==0 ){ if( n==0 ) return "both m and n are zero in '{m,n}'"; re_insert(p, iPrev, RE_OP_FORK, sz+1); + iPrev++; n--; }else{ for(j=1; j