summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-19 13:41:41 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-19 13:41:41 +0000
commit66e6b4c55568ab053eb52b573c61e4e3f9235b32 (patch)
tree6ddddda74ebd725522b8c265d35e5cd8fbdad696 /regcomp.c
parentdd5def096b7b2dabfe2022669c29c16240d7da96 (diff)
downloadperl-66e6b4c55568ab053eb52b573c61e4e3f9235b32.tar.gz
Actually, only changes to regexec.c from #30081 needed to be reverted.
p4raw-id: //depot/perl@30352
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/regcomp.c b/regcomp.c
index 6ea593ea8d..b42cbbdb5a 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4710,8 +4710,9 @@ Perl_reg_named_buff_get(pTHX_ const REGEXP * const rx, SV* namesv, U32 flags)
SV* sv_dat=HeVAL(he_str);
I32 *nums=(I32*)SvPVX(sv_dat);
for ( i=0; i<SvIVX(sv_dat); i++ ) {
- if ((I32)(rx->lastparen) >= nums[i] &&
- rx->endp[nums[i]] != -1)
+ if ((I32)(rx->nparens) >= nums[i]
+ && rx->startp[nums[i]] != -1
+ && rx->endp[nums[i]] != -1)
{
ret = CALLREG_NUMBUF(rx,nums[i],NULL);
if (!retarray)