commit | f369b3e30bc64fcc81a8903d114204159dd96e40 | [log] [tgz] |
---|---|---|
author | Gavin D. Howard <gavin@gavinhoward.com> | Mon Mar 27 14:33:20 2023 -0600 |
committer | Gavin D. Howard <gavin@gavinhoward.com> | Mon Mar 27 14:33:20 2023 -0600 |
tree | 170b079a953e7500df8e3c4315ec7be58f17f1e7 | |
parent | 49c5d2e54f494db0df095690abce6572213efc17 [diff] |
Fix a bug mentioned in the last commit The bug was that the wrong limb was set to the value. Signed-off-by: Gavin D. Howard <gavin@gavinhoward.com>
diff --git a/src/num.c b/src/num.c index be0d575..2e32ce7 100644 --- a/src/num.c +++ b/src/num.c
@@ -3890,7 +3890,7 @@ // last limb is 0. else { - b->num[i] = (BcDig) bc_rand_bounded(rng, BC_BASE_POW); + b->num[i - 1] = (BcDig) bc_rand_bounded(rng, BC_BASE_POW); b->len = atemp.len - 1; } }