aboutsummaryrefslogtreecommitdiff
path: root/tools/plink/sshbn.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/plink/sshbn.c')
-rw-r--r--tools/plink/sshbn.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/plink/sshbn.c b/tools/plink/sshbn.c
index 51cecdf2b..2e101942b 100644
--- a/tools/plink/sshbn.c
+++ b/tools/plink/sshbn.c
@@ -418,7 +418,7 @@ static void internal_mul(const BignumInt *a, const BignumInt *b,
carry = 0;
for (cp = cps, bp = b + len; cp--, bp-- > b ;) {
t = (MUL_WORD(*ap, *bp) + carry) + *cp;
- *cp = (BignumInt) t;
+ *cp = (BignumInt) (t & 0xffffffff);
carry = (BignumInt)(t >> BIGNUM_INT_BITS);
}
*cp = carry;
@@ -687,9 +687,9 @@ static void internal_mod(BignumInt *a, int alen,
t = MUL_WORD(q, m[k]);
t += c;
c = (unsigned)(t >> BIGNUM_INT_BITS);
- if ((BignumInt) t > a[i + k])
+ if (((BignumInt)(t&0xffffffff)) > a[i + k])
c++;
- a[i + k] -= (BignumInt) t;
+ a[i + k] -= (BignumInt) (t&0xffffffff);
}
/* Add back m in case of borrow */