summaryrefslogtreecommitdiff
path: root/Zend/zend_strtod.c
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend_strtod.c')
-rw-r--r--Zend/zend_strtod.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/Zend/zend_strtod.c b/Zend/zend_strtod.c
index a65b738b53..bc2ca97b19 100644
--- a/Zend/zend_strtod.c
+++ b/Zend/zend_strtod.c
@@ -1720,14 +1720,7 @@ ZEND_API char * zend_dtoa(double _d, int mode, int ndigits, int *decpt, int *sig
if (value(d) > 0.5 + value(eps))
goto bump_up;
else if (value(d) < 0.5 - value(eps)) {
- /* cut ALL traling zeros only if the number of chars is greater than precision
- * otherwise cut only extra zeros
- */
- if (k < ndigits) {
- while(*--s == '0' && (s - s0) > k);
- } else {
- while(*--s == '0');
- }
+ while(*--s == '0');
s++;
goto ret1;
}