about summary refs log tree commit diff
path: root/stdio-common/printf_fp.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/printf_fp.c')
-rw-r--r--stdio-common/printf_fp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index 7b46cd6bb9..e0fb742cfe 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -208,7 +208,9 @@ __printf_fp (FILE *fp,
 	      tmp[fracsize - scalesize] = hi;
 	      hi = tmp[0];
 
-	      fracsize = __mpn_normal_size (frac, scalesize);
+	      fracsize = scalesize;
+	      while (fracsize != 0 && frac[fracsize - 1] == 0)
+		--fracsize;
 	      if (fracsize == 0)
 		{
 		  /* We're not prepared for an mpn variable with zero