BUG: snprintf() with floating point numbers
Paul Green
paulg at sw.stratus.com
Thu Apr 10 07:13:35 EST 2003
Fery <engard.ferenc at innomed.hu> reports:
>I used the snprintf.{c,h} in rsync for my code, and found a bug in it:
>
>snprintf(s,16,"%f",0.025) results "0.250000".
>
>The problem is in snprintf.c, in fmtfp(), around line 732. I didn't try
>the solution (I do not need it anymore), but the zpadding number of
>'0'-s should be placed before fconvert.
I just checked-in a fix for this. Thank you for your report!
Thanks
PG
--
Paul Green, Senior Technical Consultant, Stratus Technologies.
Voice: +1 978-461-7557; FAX: +1 978-461-3610
Speaking from Stratus not for Stratus
More information about the rsync
mailing list