diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-05-05 00:26:17 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2019-05-05 00:26:17 +0200 |
commit | 21ce34bd7fa69dfc263b2825653d10e2cbc68853 (patch) | |
tree | 4afc098b758cf9209dc49fa8c38dd8f7cb2c51b5 /sys | |
parent | 1d82e3f42aa82b12edba2e057c1a6cc090ee1c80 (diff) |
libc: fix NaN check precedence bug in modf() (thanks BurnZeZ)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/libc/port/frexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/src/libc/port/frexp.c b/sys/src/libc/port/frexp.c index e2f4fb072..51ba57e5a 100644 --- a/sys/src/libc/port/frexp.c +++ b/sys/src/libc/port/frexp.c @@ -93,7 +93,7 @@ modf(double d, double *ip) e = (x.hi >> SHIFT) & MASK; if(e == MASK){ *ip = d; - if(x.lo != 0 || (x.hi & 0xfffffL != 0)) /* NaN */ + if(x.lo != 0 || (x.hi & 0xfffffL) != 0) /* NaN */ return d; /* ±Inf */ x.hi &= 0x80000000L; |