From: David Dyck Date: Thu, 8 Apr 2004 19:02:26 +0000 (-0700) Subject: Re: #28386: UNIVERSAL::VERSION segfaults if $VERSION not defined (w/ patch to fix... X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b38a9dc5a5a836149c372fca1d79086bd187f606;p=p5sagit%2Fp5-mst-13.2.git Re: #28386: UNIVERSAL::VERSION segfaults if $VERSION not defined (w/ patch to fix universal.c) Message-ID: p4raw-id: //depot/perl@22682 --- diff --git a/universal.c b/universal.c index bac641c..78d30cb 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); }