Change 12050 by sky@sky-titanic on 2001/09/17 12:44:36
Fixes coredump introduced by 11755 and 11790. Thanks to Doug for
finding it.
Affected files ...
... //depot/perl/sv.c#472 edit
Differences ...
==== //depot/perl/sv.c#472 (text) ====
Index: perl/sv.c
--- perl/sv.c.~1~ Mon Sep 17 07:00:05 2001
+++ perl/sv.c Mon Sep 17 07:00:05 2001
@@ -9808,12 +9808,18 @@
{
I32 len = av_len((AV*)proto_perl->Iregex_padav);
SV** regexen = AvARRAY((AV*)proto_perl->Iregex_padav);
- for(i = 0; i <= len; i++) {
- av_push(PL_regex_padav,
- SvREFCNT_inc(
+ av_push(PL_regex_padav,
+ sv_dup_inc(regexen[0],param));
+ for(i = 1; i <= len; i++) {
+ if(SvREPADTMP(regexen[i])) {
+ av_push(PL_regex_padav, sv_dup_inc(regexen[i], param));
+ } else {
+ av_push(PL_regex_padav,
+ SvREFCNT_inc(
newSViv(PTR2IV(re_dup(INT2PTR(REGEXP *,
SvIVX(regexen[i])), param)))
- ));
+ ));
+ }
}
}
PL_regex_pad = AvARRAY(PL_regex_padav);
End of Patch.