X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/75bae1395a48cf9d15bcf8514189a348f623c022..9e55cd457afb2e58007e96f54c82194334ef2266:/sshbn.c diff --git a/sshbn.c b/sshbn.c index 505a66c3..40f9560f 100644 --- a/sshbn.c +++ b/sshbn.c @@ -753,8 +753,8 @@ Bignum bignum_from_long(unsigned long n) Bignum ret; ret = newbn(3); - ret[1] = n & 0xFFFF; - ret[2] = (n >> 16) & 0xFFFF; + ret[1] = (unsigned short)(n & 0xFFFF); + ret[2] = (unsigned short)((n >> 16) & 0xFFFF); ret[3] = 0; ret[0] = (ret[2] ? 2 : 1); return ret;