Skip to content

Commit f4fa8d2

Browse files
committed
forbid a test iteration of 0 or less
1 parent 0ce4554 commit f4fa8d2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/tests.c

+4
Original file line numberDiff line numberDiff line change
@@ -5632,6 +5632,10 @@ int main(int argc, char **argv) {
56325632
count = strtol(env, NULL, 0);
56335633
}
56345634
}
5635+
if (count <= 0) {
5636+
fputs("An iteration count of 0 or less is not allowed.\n", stderr);
5637+
return EXIT_FAILURE;
5638+
}
56355639
printf("test count = %i\n", count);
56365640

56375641
/* find random seed */

0 commit comments

Comments
 (0)