File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -510,12 +510,16 @@ supported by Windows' cmd.\n\n");
510510 case 'h' : /* help */
511511 helpme (argv [0 ]);
512512 return EXIT_SUCCESS ;
513- break ;
514513 default :
515514 fprintf (stderr , "Usage: %s [-e] [-d] -i input -o output -k key\n" , argv [0 ]);
516515 return 1 ;
517516 }
518517 }
518+
519+ if (argc == 1 ) {
520+ helpme (argv [0 ]);
521+ return EXIT_SUCCESS ;
522+ }
519523
520524 if (o_enc && o_dec ) {
521525 fprintf (stderr , "🚧 Encryption (-e) and decryption (-d) flags are incompatible.\n" );
@@ -527,6 +531,11 @@ supported by Windows' cmd.\n\n");
527531 return EXIT_FAILURE ;
528532 }
529533
534+ if (!o_out ) {
535+ fprintf (stderr , "🚧 An output file (-o) is required.\n" );
536+ return EXIT_FAILURE ;
537+ }
538+
530539 if (!o_enc && !o_dec ) {
531540 fprintf (stderr , "🚧 Encryption (-e) or decryption (-d) flag is required.\n" );
532541 return EXIT_FAILURE ;
You can’t perform that action at this time.
0 commit comments