summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/internal/floatscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
index 8c0828fc..b15366b6 100644
--- a/src/internal/floatscan.c
+++ b/src/internal/floatscan.c
@@ -347,7 +347,7 @@ static long double hexfloat(FILE *f, int bits, int emin, int sign, int pok)
else d = c-'0';
if (dc<8) {
x = x*16 + d;
- } else if (dc < LDBL_MANT_DIG/4+1) {
+ } else if (dc < (LDBL_MANT_DIG+3)/4+1) {
y += d*(scale/=16);
} else if (d && !gottail) {
y += 0.5*scale;