mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Obtained from: 1.1.5 (originally by jtc)
Fix printf("%g", 0.0) - print "0", not "0.". The previous fixes in this area had one non-cosmetic (non-)change that caused this bug. Bruce
This commit is contained in:
parent
f85e2485b8
commit
ffe57f1a20
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7649
@ -730,7 +730,8 @@ number: if ((dprec = prec) >= 0)
|
||||
if (ch >= 'f') { /* 'f' or 'g' */
|
||||
if (_double == 0) {
|
||||
/* kludge for __dtoa irregularity */
|
||||
if (prec == 0 && (flags & ALT) == 0) {
|
||||
if (expt >= ndig &&
|
||||
(flags & ALT) == 0) {
|
||||
PRINT("0", 1);
|
||||
} else {
|
||||
PRINT("0.", 2);
|
||||
|
Loading…
Reference in New Issue
Block a user