diff options
author | Hugo van der Sanden <hv@crypt.org> | 2001-05-27 21:39:32 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-05-28 15:26:14 +0000 |
commit | 61604483c958ad84fdd51eef8f0feea833bdc988 (patch) | |
tree | 097a8cdd814f9c8bd9ca5083e76734ff5f69b4ca /sv.c | |
parent | 0b490c9cf3b42eb2e5ff3d67a31af1e39c211fe0 (diff) | |
download | perl-61604483c958ad84fdd51eef8f0feea833bdc988.tar.gz |
Re: [ID 20010526.004] Taint looses value
Message-Id: <200105271939.UAA27591@crypt.compulink.co.uk>
p4raw-id: //depot/perl@10252
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |