Modified fix for bug #22187 so that it does not affect handling of numbers

represented in scientific notation.
This commit is contained in:
Ilia Alshanetsky 2003-02-13 19:02:34 +00:00
parent e6841d6c35
commit f9669f6c49

View File

@ -298,7 +298,10 @@ ap_php_cvt(double arg, int ndigits, int *decpt, int *sign, int eflag, char *buf)
while (p1 < &buf[NDIG])
*p++ = *p1++;
} else if (arg > 0) {
while ((fj = arg * 10) < 1 && (r2 * -1) < ndigits) {
while ((fj = arg * 10) < 1) {
if (!eflag && (r2 * -1) < ndigits) {
break;
}
arg = fj;
r2--;
}