summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bignum.c b/bignum.c
index c93061d44f..5918cefb7e 100644
--- a/bignum.c
+++ b/bignum.c
@@ -4452,11 +4452,11 @@ bigrsh_bang(BDIGIT* xds, long xn, unsigned long shift)
i = 0;
zds = xds + s1;
num = *zds++>>s2;
- do {
+ while (i < xn - s1 - 1) {
xds[i++] = BIGLO(*zds<<s3) | num;
num = *zds++>>s2;
}
- while (i < xn - s1 - 1);
+ assert(i < xn);
xds[i] = num;
MEMZERO(xds + xn - s1, BDIGIT, s1);
}