aboutsummaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bignum.c b/bignum.c
index 039b56c597..ab702082b2 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2640,6 +2640,9 @@ bigdivrem_normal(BDIGIT *zds, size_t zn, const BDIGIT *xds, size_t xn, BDIGIT *y
{
int shift;
+ assert(zn == xn + 1);
+ assert(yn < xn || (xn == yn && yds[yn - 1] <= xds[xn - 1]));
+
shift = nlz(yds[yn-1]);
if (shift) {
bary_small_lshift(yds, yds, yn, shift);