diff options
author | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-01-08 20:19:41 +0000 |
---|---|---|
committer | Nick Ing-Simmons <nik@tiuk.ti.com> | 2001-01-08 20:19:41 +0000 |
commit | 372b2723c1b440727154f21dc614ca857f429e6c (patch) | |
tree | ac6961200cab2440312f45bfd7f4eabcade700f1 /sv.c | |
parent | f7e7eb72c805f1b630a3d1a32ed33c0f6da60bea (diff) | |
parent | af3eb38fbc0ab18bd280933f789a67d68b6c5e4a (diff) | |
download | perl-372b2723c1b440727154f21dc614ca857f429e6c.tar.gz |
Integrate mainline
p4raw-id: //depot/perlio@8370
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1678,6 +1678,12 @@ S_sv_2iuv_non_preserve (pTHX_ register SV *sv, I32 numtype) SvIsUV_on(sv); SvUVX(sv) = U_V(SvNVX(sv)); if ((NV)(SvUVX(sv)) == SvNVX(sv)) { + if (SvUVX(sv) == UV_MAX) { + /* As we know that NVs don't preserve UVs, UV_MAX cannot + possibly be preserved by NV. Hence, it must be overflow. + NOK, IOKp */ + return IS_NUMBER_OVERFLOW_UV; + } SvIOK_on(sv); /* Integer is precise. NOK, UOK */ } else { /* Integer is imprecise. NOK, IOKp */ |