BUG: snprintf() with floating point numbers

Fery engard.ferenc at innomed.hu
Sat Mar 15 00:31:15 EST 2003


Hello,

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 am not in the list, so please cc the answer for the address above,
too.

Regards,
Circum


More information about the rsync mailing list