From: Gurusamy Sarathy Date: Fri, 28 Apr 2000 07:15:04 +0000 (+0000) Subject: numeric conversion of non-number in change#3378 tramples on X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b9e3c00eb5e1b249b97c7eca281d6caed81b1b1;p=p5sagit%2Fp5-mst-13.2.git numeric conversion of non-number in change#3378 tramples on OOK offset, causing segfaults p4raw-link: @3378 on //depot/perl: 25da4f389200e19df8aa50bcef9af9506f48ed2e p4raw-id: //depot/perl@5983 --- diff --git a/sv.c b/sv.c index a996471..b83444a 100644 --- a/sv.c +++ b/sv.c @@ -1483,8 +1483,8 @@ Perl_sv_2iv(pTHX_ register SV *sv) if (SvTYPE(sv) < SVt_PVIV) sv_upgrade(sv, SVt_PVIV); - SvIVX(sv) = 0; (void)SvIOK_on(sv); + SvIVX(sv) = 0; if (ckWARN(WARN_NUMERIC)) not_a_number(sv); } @@ -1637,10 +1637,10 @@ Perl_sv_2uv(pTHX_ register SV *sv) if (SvTYPE(sv) < SVt_PVIV) sv_upgrade(sv, SVt_PVIV); - SvUVX(sv) = 0; /* We assume that 0s have the - same bitmap in IV and UV. */ (void)SvIOK_on(sv); (void)SvIsUV_on(sv); + SvUVX(sv) = 0; /* We assume that 0s have the + same bitmap in IV and UV. */ if (ckWARN(WARN_NUMERIC)) not_a_number(sv); }