diff options
author | Libor M <liborm85@gmail.com> | 2015-10-17 08:09:16 +0200 |
---|---|---|
committer | Nikita Popov <nikic@php.net> | 2017-01-07 19:10:31 +0100 |
commit | 90dcbbe3cb9aed197cbb854afe2eed0f6479a95a (patch) | |
tree | 8f942c436ab040f1bb3d4893c88aa5d3ef68aa6e /ext/bcmath/bcmath.c | |
parent | 00062d2ea8a433582d96e37772fa8928c8454938 (diff) | |
download | php-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.c | 4 |
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: |