diff options
Diffstat (limited to 'stdio-common')
-rw-r--r-- | stdio-common/printf_fp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c index 2147b2994d..0f598d87ef 100644 --- a/stdio-common/printf_fp.c +++ b/stdio-common/printf_fp.c @@ -923,7 +923,9 @@ __printf_fp (FILE *fp, { wchar_t *wtp = wcp; - if (digit == L'5' && (*(wcp - 1) & 1) == 0) + if (digit == L'5' + && ((*(wcp - 1) != decimalwc && (*(wcp - 1) & 1) == 0) + || ((*(wcp - 1) == decimalwc && (*(wcp - 2) & 1) == 0)))) { /* This is the critical case. */ if (fracsize == 1 && frac[0] == 0) |