about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/internal/floatscan.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/internal/floatscan.c b/src/internal/floatscan.c
index 80305ee6..ae098526 100644
--- a/src/internal/floatscan.c
+++ b/src/internal/floatscan.c
@@ -110,7 +110,10 @@ static long double decfloat(FILE *f, int c, int bits, int emin, int sign, int po
 			gotdig=1;
 		} else {
 			dc++;
-			if (c!='0') x[KMAX-4] |= 1;
+			if (c!='0') {
+				lnz = dc;
+				x[KMAX-4] |= 1;
+			}
 		}
 	}
 	if (!gotrad) lrp=dc;