1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

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

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) {
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 {