diff --git a/ext/standard/math.c b/ext/standard/math.c index 62bf1a4b937..137b228d964 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -1011,7 +1011,7 @@ PHPAPI char *_php_math_number_format(double d, int dec, char dec_point, char tho /* allow for thousand separators */ if (thousand_sep) { - integral += integral / 3; + integral += (integral-1) / 3; } reslen = integral;