fix printf rounding with %g for some corner case midpoints
authorRich Felker <dalias@aerifal.cx>
Mon, 7 Apr 2014 17:50:05 +0000 (13:50 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 7 Apr 2014 17:50:05 +0000 (13:50 -0400)
commite94d0692864ecf9522fd6a97610a47a2f718d3de
tree9270fe106eae71c137ab703d3209ce9c1b466ed8
parentefe07b0f8914eccf5eabce0dbd6ea5da7d7db38c
fix printf rounding with %g for some corner case midpoints

the subsequent rounding code assumes the end pointer (z) accurately
reflects the end of significance in the decimal expansion, but for
certain large integers, spurious trailing zero slots were left behind
when applying the binary exponent.

issue reported by Morten Welinder; the analysis of the cause was
performed by nsz, who also proposed this change.
src/stdio/vfprintf.c