Skip to content

Commit 4bc97db

Browse files
committed
fix merge
1 parent 33d41da commit 4bc97db

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ext/bcmath/bcmath.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,9 @@ PHP_FUNCTION(bcpowmod)
439439
scale_int = (int) ((int)scale < 0 ? 0 : scale);
440440

441441
if (bc_raisemod(first, second, mod, &result, scale_int) != -1) {
442-
if (result->n_scale > scale) {
443-
result->n_scale = (int)scale;
442+
if (result->n_scale > scale_int) {
443+
result = split_bc_num(result);
444+
result->n_scale = scale_int;
444445
}
445446
RETVAL_STR(bc_num2str(result));
446447
} else {

0 commit comments

Comments
 (0)