diff options
Diffstat (limited to 'misc')
-rw-r--r-- | misc/efgcvt_r.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/misc/efgcvt_r.c b/misc/efgcvt_r.c index 9e586e1..6434b9d 100644 --- a/misc/efgcvt_r.c +++ b/misc/efgcvt_r.c @@ -106,7 +106,7 @@ APPEND (FUNC_PREFIX, fcvt_r) (value, ndigit, decpt, sign, buf, len) ++i; while (i < n && !isdigit (buf[i])); - if (*decpt == 1 && buf[0] == '0') + if (*decpt == 1 && buf[0] == '0' && value != 0.0) { /* We must not have leading zeroes. Strip them all out and adjust *DECPT if necessary. */ |