Skip to content

Commit a80c4a2

Browse files
committed
Bugfix related to scale mismatch in subtraction.
See test case: bcadd("19.99","500",2), was producing -4.8, should have produced -480.01. Fix is based on correct libbcmath code.
1 parent 629cf1c commit a80c4a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/_phpjs_shared/_phpjs_shared_bc.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,9 +931,9 @@ function _phpjs_shared_bc () {
931931
borrow = 1;
932932
} else {
933933
borrow = 0;
934-
diff.n_value[diffptr--] = val;
935-
//*diffptr-- = val;
936934
}
935+
diff.n_value[diffptr--] = val;
936+
//*diffptr-- = val;
937937
}
938938
}
939939

0 commit comments

Comments
 (0)