Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.1.2, 4.1.3, 4.1.4, 4.2.0
-
None
-
All
-
Patch Available
-
Incorrect Behavior
Description
For additional information see this thread:
http://www.mail-archive.com/dev@stdcxx.apache.org/msg00213.html
The proposed patch below:
Index: src/punct.cpp =================================================================== --- src/punct.cpp (revision 631177) +++ src/punct.cpp (working copy) @@ -619,9 +619,7 @@ const int fltfld = fmtflags & _RWSTD_IOS_FLOATFIELD; // follows resolution of lwg issue 231 - if ( ( _RWSTD_IOS_FIXED == fltfld - || _RWSTD_IOS_SCIENTIFIC == fltfld) - && prec >= 0 || prec > 0) { + if (0 <= prec) { // 7.19.6.1, p5 of C99 specifies that, when given using the // asterisk, negative precision is treated the same as if