Skip to content

Commit 5738e86

Browse files
tests: Initialize random group elements fully
Also fix add a missing comment.
1 parent c9939ba commit 5738e86

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/group.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ static int secp256k1_ge_is_infinity(const secp256k1_ge *a);
5959
/** Check whether a group element is valid (i.e., on the curve). */
6060
static int secp256k1_ge_is_valid_var(const secp256k1_ge *a);
6161

62+
/** Set r equal to the inverse of a (i.e., mirrored around the X axis) */
6263
static void secp256k1_ge_neg(secp256k1_ge *r, const secp256k1_ge *a);
6364

6465
/** Set a group element equal to another which is given in jacobian coordinates */

src/tests.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ void random_group_element_test(secp256k1_ge *ge) {
8686
break;
8787
}
8888
} while(1);
89+
ge->infinity = 0;
8990
}
9091

9192
void random_group_element_jacobian_test(secp256k1_gej *gej, const secp256k1_ge *ge) {

0 commit comments

Comments
 (0)