Skip to content

Commit 977c863

Browse files
committed
Added a comment
1 parent 95efa0c commit 977c863

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/bcmath/libbcmath/src/compare.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ bcmath_compare_result _bc_do_compare(bc_num n1, bc_num n2, size_t scale, bool us
4545

4646
/* First, compare signs. */
4747
if (use_sign && n1->n_sign != n2->n_sign) {
48+
/*
49+
* scale and n->n_scale differ only in Number objects.
50+
* This happens when explicitly specify the scale in a Number method.
51+
*/
4852
if ((n1->n_scale > scale || n2->n_scale > scale) &&
4953
n1->n_len == 1 && n2->n_len == 1 &&
5054
n1->n_value[0] == 0 && n2->n_value[0] == 0 &&

0 commit comments

Comments
 (0)