diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-11 23:58:31 +0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-11 23:58:31 +0200 |
| commit | 0d890025ec338b767afd8433d3d852d7a4bba1d8 (patch) | |
| tree | 4b0b7f9c4cde88e1e73ec5acb96de590cf22cfc9 /ext/bcmath/libbcmath/src/str2num.c | |
| parent | 86dd321c0c14497f1e72e711fbbb157f2fc9b345 (diff) | |
| parent | 77f3cef35ced72f4aa873427ec053763ed3f3771 (diff) | |
| download | php-git-0d890025ec338b767afd8433d3d852d7a4bba1d8.tar.gz | |
Merge branch 'PHP-7.2'
* PHP-7.2:
Fixed bug #46781 (BC math handles minus zero incorrectly)
Diffstat (limited to 'ext/bcmath/libbcmath/src/str2num.c')
| -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; } |
