Skip to content

Commit 884e909

Browse files
committed
replaced "quot_arr_size - 1" with quot_top_index
1 parent cd58662 commit 884e909

File tree

1 file changed

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

1 file changed

+1
-1
lines changed

ext/bcmath/libbcmath/src/div.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static inline void bc_fast_div(
5151
{
5252
size_t numerator_top_index = numerator_arr_size - 1;
5353
size_t quot_top_index = quot_arr_size - 1;
54-
for (size_t i = 0; i < quot_arr_size - 1; i++) {
54+
for (size_t i = 0; i < quot_top_index; i++) {
5555
if (numerator_vectors[numerator_top_index - i] < divisor_vector) {
5656
quot_vectors[quot_top_index - i] = 0;
5757
/* numerator_vectors[numerator_top_index - i] < divisor_vector, so there will be no overflow. */

0 commit comments

Comments
 (0)