Bug 29621 - apr_snprintf ignores precision for small floats.
Summary: apr_snprintf ignores precision for small floats.
Status: CLOSED FIXED
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: HEAD
Hardware: PC All
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2004-06-16 18:47 UTC by Artur Zaprzala
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments
Possible solution. (437 bytes, patch)
2004-06-16 18:54 UTC, Artur Zaprzala
Details | Diff
Testcase (366 bytes, text/plain)
2004-06-16 19:04 UTC, Artur Zaprzala
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Artur Zaprzala 2004-06-16 18:47:22 UTC
E.g. the result of apr_snprintf(buf, sizeof(buf), "%.2f", 0.00000001) is
"0.0000000" instead of "0.00".
Comment 1 Artur Zaprzala 2004-06-16 18:54:28 UTC
Created attachment 11860 [details]
Possible solution.
Comment 2 Artur Zaprzala 2004-06-16 19:04:46 UTC
Created attachment 11861 [details]
Testcase
Comment 3 Jeff Trawick 2004-06-27 11:48:44 UTC
Your patch was just committed to 0.9 and 1.0 branches of APR, along with a test
function integrated into APR regression tests.

Thanks for the report/fix!