Skip to content

Commit

Permalink
check if count is negative as well
Browse files Browse the repository at this point in the history
Co-authored-by: Tim Ruffing <crypto@timruffing.de>
  • Loading branch information
apoelstra and real-or-random committed Nov 25, 2020
1 parent 1316092 commit a729a6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tests.c
Expand Up @@ -5632,7 +5632,7 @@ int main(int argc, char **argv) {
count = strtol(env, NULL, 0);
}
}
if (count == 0) {
if (count <= 0) {
fputs("An iteration count of 0 is not allowed.\n", stderr);
return EXIT_FAILURE;
}
Expand Down

0 comments on commit a729a6c

Please sign in to comment.