1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-26 09:42:25 +00:00

Tiny bug in bn_power_2() - didn't work with powers that were a

multiple of 16. Oops!

[originally from svn r990]
This commit is contained in:
Simon Tatham 2001-03-10 11:03:26 +00:00
parent eee0a20be6
commit 0c8635beda

View File

@ -68,7 +68,7 @@ void freebn(Bignum b) {
} }
Bignum bn_power_2(int n) { Bignum bn_power_2(int n) {
Bignum ret = newbn((n+15)/16); Bignum ret = newbn(n/16+1);
bignum_set_bit(ret, n, 1); bignum_set_bit(ret, n, 1);
return ret; return ret;
} }