Skip to content

Commit 2829007

Browse files
authored
Merge pull request #276 from libtom/fix-137
fix #137
2 parents 22768cf + a069512 commit 2829007

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bn_mp_div.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ mp_err mp_div(const mp_int *a, const mp_int *b, mp_int *c, mp_int *d)
213213

214214
/* find right hand */
215215
t2.dp[0] = ((i - 2) < 0) ? 0u : x.dp[i - 2];
216-
t2.dp[1] = ((i - 1) < 0) ? 0u : x.dp[i - 1];
216+
t2.dp[1] = x.dp[i - 1]; /* i >= 1 always holds */
217217
t2.dp[2] = x.dp[i];
218218
t2.used = 3;
219219
} while (mp_cmp_mag(&t1, &t2) == MP_GT);

0 commit comments

Comments
 (0)