summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2006-11-13 00:29:41 +0100
committerSteve Peters <steve@fisharerojo.org>2006-11-13 02:19:12 +0000
commitde8c53012b7e614137ab875e0d58a92474b317ce (patch)
treecc24fc09cc1af2e140a8d29a1bcd652cba6c4b00 /pp_hot.c
parent7834bb7eff465724a885b368420973bce2d27483 (diff)
downloadperl-de8c53012b7e614137ab875e0d58a92474b317ce.tar.gz
Regex Utility Functions and Substituion Fix (XML::Twig core dump)
Message-ID: <9b18b3110611121429g1fc9d6c1t4007dc711f9e8396@mail.gmail.com> Plus a couple tweaks to ext/re/re.pm and t/op/pat.t to those patches to apply cleanly. p4raw-id: //depot/perl@29252
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/pp_hot.c b/pp_hot.c
index d2e8e87b18..025e9571aa 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1497,11 +1497,11 @@ yup: /* Confirmed by INTUIT */
rx->subbeg = (char *) truebase;
rx->startp[0] = s - truebase;
if (RX_MATCH_UTF8(rx)) {
- char * const t = (char*)utf8_hop((U8*)s, rx->minlen);
+ char * const t = (char*)utf8_hop((U8*)s, rx->minlenret);
rx->endp[0] = t - truebase;
}
else {
- rx->endp[0] = s - truebase + rx->minlen;
+ rx->endp[0] = s - truebase + rx->minlenret;
}
rx->sublen = strend - truebase;
goto gotcha;
@@ -1531,11 +1531,11 @@ yup: /* Confirmed by INTUIT */
rx->sublen = strend - t;
RX_MATCH_COPIED_on(rx);
off = rx->startp[0] = s - t;
- rx->endp[0] = off + rx->minlen;
+ rx->endp[0] = off + rx->minlenret;
}
else { /* startp/endp are used by @- @+. */
rx->startp[0] = s - truebase;
- rx->endp[0] = s - truebase + rx->minlen;
+ rx->endp[0] = s - truebase + rx->minlenret;
}
rx->nparens = rx->lastparen = rx->lastcloseparen = 0; /* used by @-, @+, and $^N */
LEAVE_SCOPE(oldsave);
@@ -2188,7 +2188,7 @@ PP(pp_subst)
#ifdef PERL_OLD_COPY_ON_WRITE
&& !is_cow
#endif
- && (I32)clen <= rx->minlen && (once || !(r_flags & REXEC_COPY_STR))
+ && (I32)clen <= rx->minlenret && (once || !(r_flags & REXEC_COPY_STR))
&& !(rx->reganch & ROPT_LOOKBEHIND_SEEN)
&& (!doutf8 || SvUTF8(TARG))) {
if (!CALLREGEXEC(rx, s, strend, orig, 0, TARG, NULL,