Skip to content

Commit 61d632e

Browse files
committed
At the end of the process, the code for when quot is 0 is restored.
1 parent da0916c commit 61d632e

File tree

1 file changed

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

1 file changed

+1
-2
lines changed

ext/bcmath/libbcmath/src/div.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,7 @@ bool bc_divide(bc_num numerator, bc_num divisor, bc_num *quot, size_t scale)
433433

434434
_bc_rm_leading_zeros(*quot);
435435
if (bc_is_zero(*quot)) {
436-
bc_free_num(quot);
437-
goto quot_zero;
436+
(*quot)->n_sign = PLUS;
438437
} else {
439438
(*quot)->n_sign = numerator->n_sign == divisor->n_sign ? PLUS : MINUS;
440439
}

0 commit comments

Comments
 (0)