From: Hugo van der Sanden Date: Sun, 27 May 2001 20:39:32 +0000 (+0100) Subject: Re: [ID 20010526.004] Taint looses value X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=61604483c958ad84fdd51eef8f0feea833bdc988;p=p5sagit%2Fp5-mst-13.2.git Re: [ID 20010526.004] Taint looses value Message-Id: <200105271939.UAA27591@crypt.compulink.co.uk> p4raw-id: //depot/perl@10252 --- diff --git a/sv.c b/sv.c index f615fe5..4fa39e9 100644 --- a/sv.c +++ b/sv.c @@ -2306,7 +2306,10 @@ Perl_sv_2nv(pTHX_ register SV *sv) } else if (SvTYPE(sv) < SVt_PVNV) sv_upgrade(sv, SVt_PVNV); - if (SvIOKp(sv) && + if (SvNOKp(sv) && !(SvIOK(sv) || SvPOK(sv))) { + SvNOK_on(sv); + } + else if (SvIOKp(sv) && (!SvPOKp(sv) || !strchr(SvPVX(sv),'.') || !looks_like_number(sv))) { SvNVX(sv) = SvIsUV(sv) ? (NV)SvUVX(sv) : (NV)SvIVX(sv);