Skip to content

Commit 90aeb41

Browse files
committed
Turns out we have an API for is_neg
1 parent 19e9e7d commit 90aeb41

File tree

1 file changed

+1
-1
lines changed
  • ext/bcmath/libbcmath/src

1 file changed

+1
-1
lines changed

ext/bcmath/libbcmath/src/sqrt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ bool bc_sqrt(bc_num *num, size_t scale)
4040
{
4141
const bc_num local_num = *num;
4242
/* Initial checks. */
43-
if (local_num->n_sign == MINUS) {
43+
if (bc_is_neg(local_num)) {
4444
/* Cannot take the square root of a negative number */
4545
return false;
4646
}

0 commit comments

Comments
 (0)