Skip to content

Commit b8b4215

Browse files
committed
Fixed precision when converting double to text.
Fixed a bug in OFStandard::ftoa() that caused floating point numbers to be converted/printed with less precision than requested. Thanks to Mathieu Malaterre <[email protected]> for the bug report and test file.
1 parent b436dd1 commit b8b4215

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ofstd/libsrc/ofstd.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2455,7 +2455,7 @@ void OFStandard::ftoa(
24552455
if (!success || d != val)
24562456
{
24572457
// really need precision 17 (DBL_DECIMAL_DIG)
2458-
ftoa_convert(dst, siz, val, flags, width, prec);
2458+
ftoa_convert(dst, siz, val, flags, width, 17);
24592459
}
24602460
}
24612461
else

0 commit comments

Comments
 (0)