Fixed bug #22187 (spprintf function did not handle floats correctly).

This commit is contained in:
Ilia Alshanetsky 2003-02-12 20:41:53 +00:00
parent 0cb1ff3bda
commit f924aaf647

View File

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