Error if option is passed to contest argument
This commit is contained in:
parent
49a797a179
commit
fede23cba7
1 changed files with 5 additions and 1 deletions
|
@ -102,8 +102,12 @@ int main(int argc, char* argv[]) {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'c':
|
case 'c':
|
||||||
printf ("contest activated\n");
|
if ( OPTIONAL_ARGUMENT_IS_PRESENT ) {
|
||||||
|
fprintf(stderr, "Error: contest option doesn't support arguments\n");
|
||||||
|
exit (EXIT_FAILURE);
|
||||||
|
}
|
||||||
contest = true;
|
contest = true;
|
||||||
|
printf ("contest activated\n");
|
||||||
break;
|
break;
|
||||||
case 'V':
|
case 'V':
|
||||||
printf("utictactoe %d.%d.%d\n", VERSION, SUBVERSION, REVISION);
|
printf("utictactoe %d.%d.%d\n", VERSION, SUBVERSION, REVISION);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue