diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-06 23:30:53 +0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2017-09-06 23:30:53 +0200 |
| commit | dea41f3c3a003a22893b27eead429f963d3230c3 (patch) | |
| tree | ab38286a052c0620eafc1f9f858ec103bace515e /ext/bcmath/libbcmath/src/divmod.c | |
| parent | 42549b7844472a896dbd51b8305a835e731ecb25 (diff) | |
| download | php-git-dea41f3c3a003a22893b27eead429f963d3230c3.tar.gz | |
Fixed bug #44995 (bcpowmod() fails if scale != 0)
`bc_divmod()` is supposed to do integer division, so we must not apply
a scale factor here.
Diffstat (limited to 'ext/bcmath/libbcmath/src/divmod.c')
| -rw-r--r-- | ext/bcmath/libbcmath/src/divmod.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/bcmath/libbcmath/src/divmod.c b/ext/bcmath/libbcmath/src/divmod.c index d7aaa3509d..08c2f8a2a2 100644 --- a/ext/bcmath/libbcmath/src/divmod.c +++ b/ext/bcmath/libbcmath/src/divmod.c @@ -59,7 +59,7 @@ bc_divmod (bc_num num1, bc_num num2, bc_num *quot, bc_num *rem, int scale) bc_init_num(&temp); /* Calculate it. */ - bc_divide (num1, num2, &temp, scale); + bc_divide (num1, num2, &temp, 0); if (quot) quotient = bc_copy_num (temp); bc_multiply (temp, num2, &temp, rscale); |
