the bignum data! This wasn't actually causing puttygen-zero-div (its
unwarranted assumption was still correct under Windows) but it would
have caused the same symptoms under Unix when I got round to porting
PuTTYgen.
git-svn-id: http://svn.tartarus.org/sgt/putty@3315
cda61777-01e9-0310-a592-
d414129be87e
r = 0;
mod = modulus;
for (i = number[0]; i > 0; i--)
- r = (r * 65536 + number[i]) % mod;
+ r = (r * (BIGNUM_TOP_BIT % mod) * 2 + number[i] % mod) % mod;
return (unsigned short) r;
}