Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #78238: BCMath returns "-0"
This commit is contained in:
Christoph M. Becker 2021-07-16 15:55:54 +02:00
commit 9fbcaa57aa
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
5 changed files with 32 additions and 3 deletions

View file

@ -50,7 +50,7 @@ zend_string
int index, signch;
/* Allocate the string memory. */
signch = num->n_sign != PLUS; /* Number of sign chars. */
signch = num->n_sign != PLUS && !bc_is_zero_for_scale(num, MIN(num->n_scale, scale)); /* Number of sign chars. */
if (scale > 0)
str = zend_string_alloc(num->n_len + scale + signch + 1, 0);
else