Merge branch 'PHP-8.4'

* PHP-8.4:
  Fixed pointer subtraction for scale (#17986)
This commit is contained in:
Saki Takamachi 2025-03-14 09:00:33 +09:00
commit fa1effdb3c
No known key found for this signature in database
GPG key ID: 770426E17EBBB3DD

View file

@ -180,7 +180,7 @@ bool bc_str2num(bc_num *num, const char *str, const char *end, size_t scale, siz
*/ */
if (str_scale > 0) { if (str_scale > 0) {
const char *fractional_new_end = bc_skip_zero_reverse(fractional_end, fractional_ptr); 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 { } else {