forbid a test iteration of 0 or less

This commit is contained in:
Andrew Poelstra 2020-11-25 00:05:13 +00:00
parent 0ce4554881
commit f4fa8d226a
1 changed files with 4 additions and 0 deletions

View File

@ -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 */