mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fixed pointer subtraction for scale (#17986)
This commit is contained in:
commit
fa1effdb3c
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue