summaryrefslogtreecommitdiff
path: root/regcomp.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-19 13:08:03 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-02-19 13:08:03 +0000
commitdd5def096b7b2dabfe2022669c29c16240d7da96 (patch)
treee1f1820ca585733b77168de8466f8cfb58d21692 /regcomp.c
parentb54fc2b60bc365faffaf24860c5306add8af3c87 (diff)
downloadperl-dd5def096b7b2dabfe2022669c29c16240d7da96.tar.gz
Revert change #30081 at dmq's request, and mark its tests
as TODO. (This should restore compilation with g++) p4raw-link: @30081 on //depot/perl: ded05c2a789e70bb7204e21b2aa98c6d1ac776c2 p4raw-id: //depot/perl@30351
Diffstat (limited to 'regcomp.c')
-rw-r--r--regcomp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/regcomp.c b/regcomp.c
index 197ab12dc0..6ea593ea8d 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -4710,9 +4710,8 @@ 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->nparens) >= nums[i]
- && rx->startp[nums[i]] != -1
- && rx->endp[nums[i]] != -1)
+ if ((I32)(rx->lastparen) >= nums[i] &&
+ rx->endp[nums[i]] != -1)
{
ret = CALLREG_NUMBUF(rx,nums[i],NULL);
if (!retarray)