From: Anatol Belski Date: Wed, 27 Apr 2016 10:24:28 +0000 (+0200) Subject: fix merge X-Git-Tag: php-7.0.7RC1~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4bc97db0b8558aa1bd41fba6e09ee5e2045430ee;p=php fix merge --- 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 {