Check that there are no positional arguments

This commit is contained in:
Vftdan 2024-08-18 20:23:57 +02:00
parent 244bb719b1
commit 4c654cd621
1 changed files with 4 additions and 0 deletions

4
main.c
View File

@ -84,6 +84,10 @@ main(int argc, char ** argv)
return 1;
}
}
if (optind < argc) {
fprintf(stderr, "Unexpected positional argument at position %d: %s\n", optind, argv[optind]);
return 1;
}
ProcessingState state = (ProcessingState) {
.wait_delay = NULL,