Skip to content

Commit 801bd96

Browse files
committed
Fix BC Compare
1 parent b137c8c commit 801bd96

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

ext/bcmath/libbcmath/src/compare.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -117,15 +117,15 @@ int _bc_do_compare(bc_num n1, bc_num n2, bool use_sign, bool ignore_last)
117117
}
118118
}
119119
}
120-
}
121-
} else {
122-
for (count = n2->n_scale-n1->n_scale; count>0; count--) {
123-
if (*n2ptr++ != 0) {
124-
/* Magnitude of n1 < n2. */
125-
if (!use_sign || n1->n_sign == PLUS) {
126-
return (-1);
127-
} else {
128-
return (1);
120+
} else {
121+
for (count = n2->n_scale-n1->n_scale; count>0; count--) {
122+
if (*n2ptr++ != 0) {
123+
/* Magnitude of n1 < n2. */
124+
if (!use_sign || n1->n_sign == PLUS) {
125+
return (-1);
126+
} else {
127+
return (1);
128+
}
129129
}
130130
}
131131
}

0 commit comments

Comments
 (0)