summaryrefslogtreecommitdiff
path: root/ext/bcmath/bcmath.c
diff options
context:
space:
mode:
authorLibor M <liborm85@gmail.com>2015-10-17 08:09:16 +0200
committerNikita Popov <nikic@php.net>2017-01-07 19:10:31 +0100
commit90dcbbe3cb9aed197cbb854afe2eed0f6479a95a (patch)
tree8f942c436ab040f1bb3d4893c88aa5d3ef68aa6e /ext/bcmath/bcmath.c
parent00062d2ea8a433582d96e37772fa8928c8454938 (diff)
downloadphp-git-90dcbbe3cb9aed197cbb854afe2eed0f6479a95a.tar.gz
Fixed bug #46564
bcmod() no longer truncates fractionals to integers. This matches the behavior of fmod(). It also matches the behavior of bcpowmod(). It also matches the behavior of bcmod() in HHVM.
Diffstat (limited to 'ext/bcmath/bcmath.c')
-rw-r--r--ext/bcmath/bcmath.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c
index 300d88b86d..e8b87dceff 100644
--- a/ext/bcmath/bcmath.c
+++ b/ext/bcmath/bcmath.c
@@ -403,8 +403,8 @@ PHP_FUNCTION(bcmod)
bc_init_num(&first);
bc_init_num(&second);
bc_init_num(&result);
- bc_str2num(&first, ZSTR_VAL(left), 0);
- bc_str2num(&second, ZSTR_VAL(right), 0);
+ php_str2num(&first, ZSTR_VAL(left));
+ php_str2num(&second, ZSTR_VAL(right));
switch (bc_modulo(first, second, &result, 0)) {
case 0: