diff options
Diffstat (limited to 'sysdeps/ieee754/ldbl-96')
-rw-r--r-- | sysdeps/ieee754/ldbl-96/s_getpayloadl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sysdeps/ieee754/ldbl-96/s_getpayloadl.c b/sysdeps/ieee754/ldbl-96/s_getpayloadl.c index 8f09cb74c8..761bd69b58 100644 --- a/sysdeps/ieee754/ldbl-96/s_getpayloadl.c +++ b/sysdeps/ieee754/ldbl-96/s_getpayloadl.c @@ -27,6 +27,9 @@ __getpayloadl (const long double *x) uint16_t se __attribute__ ((unused)); uint32_t hx, lx; GET_LDOUBLE_WORDS (se, hx, lx, *x); + if ((se & 0x7fff) != 0x7fff + || ((hx & 0x7fffffff) | lx) == 0) + return -1; hx &= 0x3fffffff; uint64_t ix = ((uint64_t) hx << 32) | lx; return (long double) ix; |