diff options
Diffstat (limited to 'jimregexp.c')
-rw-r--r-- | jimregexp.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/jimregexp.c b/jimregexp.c index 8da9347..7725487 100644 --- a/jimregexp.c +++ b/jimregexp.c @@ -506,9 +506,11 @@ static int *regpiece(regex_t *preg, int *flagp) else { next = reginsert(preg, flags & SIMPLE ? REP: REPX, 5, ret); } - ret[2] = max; - ret[3] = min; - ret[4] = 0; + if (preg->regcode != ®dummy) { + ret[2] = max; + ret[3] = min; + ret[4] = 0; + } *flagp = (min) ? (WORST|HASWIDTH) : (WORST|SPSTART); |