diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-11 23:45:24 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-11 23:46:21 +0200 |
commit | 87a91aef835c2c361e93b4352636f0dcb3275ac9 (patch) | |
tree | 935193c6aab314b664d2155df2ba5ec4710781be /ext/bcmath/libbcmath | |
parent | 88c7556d991fab56abf0a2e20f8508b03e9a89e9 (diff) | |
parent | 9aa6898b9be78bb1e138488c3204bb745a31aca7 (diff) | |
download | php-git-87a91aef835c2c361e93b4352636f0dcb3275ac9.tar.gz |
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
Fixed bug #46781 (BC math handles minus zero incorrectly)
Diffstat (limited to 'ext/bcmath/libbcmath')
-rw-r--r-- | ext/bcmath/libbcmath/src/str2num.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/bcmath/libbcmath/src/str2num.c b/ext/bcmath/libbcmath/src/str2num.c index ef505e86e1..62544de80e 100644 --- a/ext/bcmath/libbcmath/src/str2num.c +++ b/ext/bcmath/libbcmath/src/str2num.c @@ -105,5 +105,8 @@ bc_str2num (bc_num *num, char *str, int scale) for (;strscale > 0; strscale--) *nptr++ = CH_VAL(*ptr++); } + + if (bc_is_zero (*num)) + (*num)->n_sign = PLUS; } |