]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Tiny bug in bn_power_2() - didn't work with powers that were a
authorSimon Tatham <anakin@pobox.com>
Sat, 10 Mar 2001 11:03:26 +0000 (11:03 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 10 Mar 2001 11:03:26 +0000 (11:03 +0000)
multiple of 16. Oops!

[originally from svn r990]

sshbn.c

diff --git a/sshbn.c b/sshbn.c
index 3a5ddc03c56fb6f58e6a6103f620c984c5110610..1bd3f434d8c440398adf85b28692bb973294b026 100644 (file)
--- a/sshbn.c
+++ b/sshbn.c
@@ -68,7 +68,7 @@ void freebn(Bignum b) {
 }
 
 Bignum bn_power_2(int n) {
-    Bignum ret = newbn((n+15)/16);
+    Bignum ret = newbn(n/16+1);
     bignum_set_bit(ret, n, 1);
     return ret;
 }