mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
Fixed bug #22187 (spprintf function did not handle floats correctly).
This commit is contained in:
parent
0cb1ff3bda
commit
f924aaf647
@ -298,7 +298,7 @@ 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) {
|
||||
while ((fj = arg * 10) < 1 && (r2 * -1) < ndigits) {
|
||||
arg = fj;
|
||||
r2--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user