Skip to content

Commit

Permalink
forbid a test iteration of 0 or less
Browse files Browse the repository at this point in the history
  • Loading branch information
apoelstra committed Nov 30, 2020
1 parent 0ce4554 commit f4fa8d2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -5632,6 +5632,10 @@ int main(int argc, char **argv) {
count = strtol(env, NULL, 0);
}
}
if (count <= 0) {
fputs("An iteration count of 0 or less is not allowed.\n", stderr);
return EXIT_FAILURE;
}
printf("test count = %i\n", count);

/* find random seed */
Expand Down

0 comments on commit f4fa8d2

Please sign in to comment.