author | Rich Felker <dalias@aerifal.cx> | 2014年03月09日 01:38:52 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014年03月09日 01:38:52 -0500 |
commit | ba231cf9e5923b6216081e9a626465c6643ce4d3 (patch) | |
tree | fa2e3c3b43d22efe22f5d4af24acd84504b826b0 /src/stdio/vfprintf.c | |
parent | 73f5b096056e03d8e27965040faee0af778517fc (diff) | |
download | musl-ba231cf9e5923b6216081e9a626465c6643ce4d3.tar.gz |
-rw-r--r-- | src/stdio/vfprintf.c | 3 |
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index b5948bd2..85701726 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -207,7 +207,8 @@ typedef char compiler_defines_long_double_incorrectly[9-(int)sizeof(long double) static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t) { - uint32_t big[(LDBL_MAX_EXP+LDBL_MANT_DIG)/9+1]; + uint32_t big[(LDBL_MANT_DIG+28)/29 + 1 // mantissa expansion + + (LDBL_MAX_EXP+LDBL_MANT_DIG+28+8)/9]; // exponent expansion uint32_t *a, *d, *r, *z; int e2=0, e, i, j, l; char buf[9+LDBL_MANT_DIG/4], *s; |