mingw-w64-crt/stdio/mingw_pformat.c: Perform 64-bit comparison on the mantissa of a floating point number. This fixes #459. Reference: https://sourceforge.net/p/mingw-w64/bugs/459/ Signed-off-by: Liu Hao <lh_mouse@126.com> (cherry picked from commit 9cb3a1a9c6ccefd6c1b06c24402ca8cf3dd7b3b8) Signed-off-by: Liu Hao <lh_mouse@126.com>
diff --git a/mingw-w64-crt/stdio/mingw_pformat.c b/mingw-w64-crt/stdio/mingw_pformat.c index 1500aa3..24369d1 100644 --- a/mingw-w64-crt/stdio/mingw_pformat.c +++ b/mingw-w64-crt/stdio/mingw_pformat.c
@@ -2036,8 +2036,8 @@ { /* taking the rightmost digit in each pass... */ - int c = value.__pformat_fpreg_mantissa & 0xF; - if( c == (int) value.__pformat_fpreg_mantissa) + unsigned c = value.__pformat_fpreg_mantissa & 0xF; + if( c == value.__pformat_fpreg_mantissa) { /* inserting the radix point, when we reach the last, * (i.e. the most significant digit), unless we found no