From 0c8635beda5d28f43aeece393e5c30c6202fb281 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 10 Mar 2001 11:03:26 +0000 Subject: [PATCH] Tiny bug in bn_power_2() - didn't work with powers that were a multiple of 16. Oops! [originally from svn r990] --- sshbn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sshbn.c b/sshbn.c index 3a5ddc03..1bd3f434 100644 --- 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; }