Skip to content

Commit

Permalink
empty args potential error fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
rillki committed Jan 14, 2023
1 parent 05301d6 commit 3ce6cbb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file removed assets/cat.jpg
Binary file not shown.
4 changes: 2 additions & 2 deletions source/app.d
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ enum PageSize: float[2] {
}

void main(string[] args) {
if(args.length < 2) {
writefln("\n#img2pdf: no commands provided! See \'img2pdf -h\' for more info.\n");
if(args.length < 2 || args[1][0] != '-') {
writefln("\n#img2pdf: incorrect or no commands provided! See \'img2pdf -h\' for more info.\n");
return;
}

Expand Down

0 comments on commit 3ce6cbb

Please sign in to comment.