Bug 459606 - Restore long-standing mozilla change to return a non-empty string for the no_digits case. r=crowder

This commit is contained in:
Blake Kaplan 2008-10-13 15:47:36 -07:00
parent 7d6e03614c
commit 197604d43a

View File

@ -3140,7 +3140,9 @@ dtoa
if (ilim < 0 || cmp(b,S = multadd(S,5,0)) <= 0) {
/* no digits, fcvt style */
no_digits:
k = -1 - ndigits;
/* MOZILLA CHANGE: Always return a non-empty string. */
*s++ = '0';
k = 0;
goto ret;
}
one_digit: