diff --git a/NEWS b/NEWS index 404290dcf615b..d8a9c6d894245 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,9 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 8.4.6 +- BCMath: + . Fixed pointer subtraction for scale. (SakiTakamachi) + - Core: . Fixed property hook backing value access in multi-level inheritance. (ilutov) diff --git a/ext/bcmath/libbcmath/src/str2num.c b/ext/bcmath/libbcmath/src/str2num.c index 79c1d4216fe7b..bd9a44a240503 100644 --- a/ext/bcmath/libbcmath/src/str2num.c +++ b/ext/bcmath/libbcmath/src/str2num.c @@ -180,7 +180,7 @@ bool bc_str2num(bc_num *num, const char *str, const char *end, size_t scale, siz */ if (str_scale > 0) { const char *fractional_new_end = bc_skip_zero_reverse(fractional_end, fractional_ptr); - str_scale -= fractional_new_end - fractional_end; + str_scale -= fractional_end - fractional_new_end; /* fractional_end >= fractional_new_end */ } } } else {