diff options
author | Anatol Belski <ab@php.net> | 2016-04-27 12:24:28 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2016-04-27 12:24:28 +0200 |
commit | 4bc97db0b8558aa1bd41fba6e09ee5e2045430ee (patch) | |
tree | dadb26b7ee7401def583b8b765f933ce14eb82b6 /ext/bcmath | |
parent | 33d41da3474729486d6bbb7fb13e1b697356481e (diff) | |
download | php-git-4bc97db0b8558aa1bd41fba6e09ee5e2045430ee.tar.gz |
fix merge
Diffstat (limited to 'ext/bcmath')
-rw-r--r-- | ext/bcmath/bcmath.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index 7100367faa..10450f1968 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -439,8 +439,9 @@ PHP_FUNCTION(bcpowmod) scale_int = (int) ((int)scale < 0 ? 0 : scale); if (bc_raisemod(first, second, mod, &result, scale_int) != -1) { - if (result->n_scale > scale) { - result->n_scale = (int)scale; + if (result->n_scale > scale_int) { + result = split_bc_num(result); + result->n_scale = scale_int; } RETVAL_STR(bc_num2str(result)); } else { |