|
|
Message-ID: <20140407072930.GB26358@brightrain.aerifal.cx>
Date: Mon, 7 Apr 2014 03:29:30 -0400
From: Rich Felker <dalias@...ifal.cx>
To: musl@...ts.openwall.com
Subject: Re: printf issues
On Fri, Apr 04, 2014 at 08:01:00PM -0400, Morten Welinder wrote:
> I *think* the right fix is to add the following "if' statement into
> the rounding loop:
>
> while (*d > 999999999) {
> *d--=0;
> if (d < a) *--a = 0;
> (*d)++;
> }
>
> This also ought to make the d<a test afterwards unnecessary. But
> more tests would be better.
After re-studying the code, I think this is the correct fix, and I've
committed the fix to git. I also fixed the bug where %g failed to trim
trailing zeros.
Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.