The MinGW.org Windows System Libraries
修訂 | 5fe5d0aa874341cc015b0b71f5b5a6d9f3de8e7d (tree) |
---|---|
時間 | 2016-11-02 04:45:15 |
作者 | Keith Marshall <keithmarshall@user...> |
Commiter | Keith Marshall |
Fix another printf() hex-float formatting bug.
@@ -1,3 +1,11 @@ | ||
1 | +2016-11-01 Keith Marshall <keithmarshall@users.sourceforge.net> | |
2 | + | |
3 | + Fix another printf() hex-float formatting bug. | |
4 | + | |
5 | + * mingwex/stdio/pformat.c (__pformat_emit_xfloat) | |
6 | + [stream->flags & PFORMAT_ZEROFILL]: Ignore this; it should be... | |
7 | + [(stream->flags & PFORMAT_JUSTIFY) == PFORMAT_ZEROFILL]: ...thus. | |
8 | + | |
1 | 9 | 2016-10-30 Keith Marshall <keithmarshall@users.sourceforge.net> |
2 | 10 | |
3 | 11 | Work around MSDN inconsistencies in _finddata_t naming. |
@@ -1654,7 +1654,8 @@ void __pformat_emit_xfloat( __pformat_fpreg_t value, __pformat_t *stream ) | ||
1654 | 1654 | /* If the `0' flag is in effect... |
1655 | 1655 | * Zero padding, to fill out the field, goes here... |
1656 | 1656 | */ |
1657 | - if( (stream->width > 0) && (stream->flags & PFORMAT_ZEROFILL) ) | |
1657 | + if( (stream->width > 0) | |
1658 | + && ((stream->flags & PFORMAT_JUSTIFY) == PFORMAT_ZEROFILL) ) | |
1658 | 1659 | while( stream->width-- > 0 ) |
1659 | 1660 | __pformat_putc( '0', stream ); |
1660 | 1661 |