diff --git a/src/tests.c b/src/tests.c index d72919a12a..3e26f3d948 100644 --- a/src/tests.c +++ b/src/tests.c @@ -3725,7 +3725,7 @@ static void test_hsort(size_t element_len) { secp256k1_hsort(elements, 1, element_len, test_hsort_cmp, &data); CHECK(data.counter == 0); secp256k1_hsort(elements, NUM, element_len, test_hsort_cmp, &data); - CHECK(data.counter >= NUM); + CHECK(data.counter >= NUM - 1); test_hsort_is_sorted(elements, NUM, element_len); /* Test hsort with array of random length n */