mirror of
https://github.com/php/php-src.git
synced 2025-01-26 21:54:16 +08:00
Modified fix for bug #22187 so that it does not affect handling of numbers
represented in scientific notation.
This commit is contained in:
parent
e6841d6c35
commit
f9669f6c49
@ -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--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user