summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2001-05-27 21:39:32 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-05-28 15:26:14 +0000
commit61604483c958ad84fdd51eef8f0feea833bdc988 (patch)
tree097a8cdd814f9c8bd9ca5083e76734ff5f69b4ca /sv.c
parent0b490c9cf3b42eb2e5ff3d67a31af1e39c211fe0 (diff)
downloadperl-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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sv.c b/sv.c
index f615fe561b..4fa39e9180 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);