File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -3101,14 +3101,17 @@ void test_ge(void) {
31013101
31023102 /* Test batch gej -> ge conversion with many infinities. */
31033103 for (i = 0 ; i < 4 * runs + 1 ; i ++ ) {
3104+ int odd ;
31043105 random_group_element_test (& ge [i ]);
3106+ odd = secp256k1_fe_is_odd (& ge [i ].x );
3107+ CHECK (odd == 0 || odd == 1 );
31053108 /* randomly set half the points to infinity */
3106- if ( secp256k1_fe_is_odd ( & ge [ i ]. x ) ) {
3109+ if ( odd == i % 2 ) {
31073110 secp256k1_ge_set_infinity (& ge [i ]);
31083111 }
31093112 secp256k1_gej_set_ge (& gej [i ], & ge [i ]);
31103113 }
3111- /* batch invert */
3114+ /* batch convert */
31123115 secp256k1_ge_set_all_gej_var (ge , gej , 4 * runs + 1 );
31133116 /* check result */
31143117 for (i = 0 ; i < 4 * runs + 1 ; i ++ ) {
You can’t perform that action at this time.
0 commit comments