]> Git Repo - secp256k1.git/commitdiff
fix tests.c in the count == 0 case
authorAndrew Poelstra <[email protected]>
Tue, 10 Apr 2018 19:32:04 +0000 (19:32 +0000)
committerAndrew Poelstra <[email protected]>
Tue, 10 Apr 2018 19:32:04 +0000 (19:32 +0000)
src/tests.c

index e85c46058a692105593924680135fc65101f6001..15f44914b2e5d41c0732dd1187751f7adf0aae4d 100644 (file)
@@ -2725,6 +2725,11 @@ void test_ecmult_multi(secp256k1_scratch *scratch, secp256k1_ecmult_multi_func e
     }
 
     /* Sanity check that zero scalars don't cause problems */
+    for (ncount = 0; ncount < 20; ncount++) {
+        random_scalar_order(&sc[ncount]);
+        random_group_element_test(&pt[ncount]);
+    }
+
     secp256k1_scalar_clear(&sc[0]);
     CHECK(ecmult_multi(&ctx->ecmult_ctx, scratch, &r, &szero, ecmult_multi_callback, &data, 20));
     secp256k1_scalar_clear(&sc[1]);
This page took 0.030533 seconds and 4 git commands to generate.