author | Rich Felker <dalias@aerifal.cx> | 2014年04月07日 13:50:05 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2014年04月07日 13:50:05 -0400 |
commit | e94d0692864ecf9522fd6a97610a47a2f718d3de (patch) | |
tree | 9270fe106eae71c137ab703d3209ce9c1b466ed8 /src/stdio/vfprintf.c | |
parent | efe07b0f8914eccf5eabce0dbd6ea5da7d7db38c (diff) | |
download | musl-e94d0692864ecf9522fd6a97610a47a2f718d3de.tar.gz |
-rw-r--r-- | src/stdio/vfprintf.c | 2 |
diff --git a/src/stdio/vfprintf.c b/src/stdio/vfprintf.c index 0be75498..f6e7f38d 100644 --- a/src/stdio/vfprintf.c +++ b/src/stdio/vfprintf.c @@ -308,8 +308,8 @@ static int fmt_fp(FILE *f, long double y, int w, int p, int fl, int t) *d = x % 1000000000; carry = x / 1000000000; } - if (!z[-1] && z>a) z--; if (carry) *--a = carry; + while (z>a && !z[-1]) z--; e2-=sh; } while (e2<0) { |