msvcrt: Fix inconsistent rounding behaviour for sprintf and add tests.
Piotr Caban
piotr.caban at gmail.com
Tue Jan 27 05:02:38 CST 2015
On 01/26/15 12:29, YongHao Hu wrote:
> + if(flags.Precision >= 0 && toupper(flags.Format)!='G') {
> + temp = pow(10, flags.Precision);
> + val = round(val * temp) / temp;
> + }
This is not correct, val may loose to much precision. Also temp can
become INF (in your patch temp is int but I guess it's a mistake). I'm
afraid that in order to fix this bug you'll need to stop using glibcs
sprintf in wine's printf implementation.
Your patch to msvcp tests depends on this patch. Please send patches
that depend on each other in series.
Thanks,
Piotr
More information about the wine-devel
mailing list