From dea41f3c3a003a22893b27eead429f963d3230c3 Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Wed, 6 Sep 2017 23:30:53 +0200 Subject: 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. --- ext/bcmath/libbcmath/src/divmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/bcmath/libbcmath/src/divmod.c') 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); -- cgit v1.2.1