summaryrefslogtreecommitdiff
path: root/universal.c
diff options
context:
space:
mode:
authorDavid Dyck <david.dyck@fluke.com>2004-04-08 12:02:26 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-04-09 11:44:34 +0000
commitb38a9dc5a5a836149c372fca1d79086bd187f606 (patch)
tree0916926473270396e200b8e795c86b0a07c0ddd8 /universal.c
parenta9a4ee8b12bbb03d4563807d9b09f3f7262a7701 (diff)
downloadperl-b38a9dc5a5a836149c372fca1d79086bd187f606.tar.gz
Re: #28386: UNIVERSAL::VERSION segfaults if $VERSION not defined (w/ patch to fix universal.c)
Message-ID: <Pine.LNX.4.51.0404081843290.29618@dd.tc.fluke.com> p4raw-id: //depot/perl@22682
Diffstat (limited to 'universal.c')
-rw-r--r--universal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/universal.c b/universal.c
index bac641c5f4..78d30cb516 100644
--- a/universal.c
+++ b/universal.c
@@ -374,7 +374,11 @@ XS(XS_UNIVERSAL_VERSION)
vnumify(req),vnormal(req),vnumify(sv),vnormal(sv));
}
- ST(0) = vnumify(sv);
+ if (sv == (SV*)&PL_sv_undef) {
+ ST(0) = sv;
+ } else {
+ ST(0) = vnumify(sv);
+ }
XSRETURN(1);
}