Skip to content

Commit

Permalink
Fix args -w and -H check
Browse files Browse the repository at this point in the history
 - Fix logic error in arguments check to ensure that `-w` and `-H` aren't used
   at the same time
  • Loading branch information
boretom committed Jul 16, 2020
1 parent 05b946c commit 860e13b
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/catimg.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ int main(int argc, char *argv[])
printf(USAGE);
exit(1);
}
if (rows == 0) {
adjust_to_height = 1;
}
adjust_to_height = 1;
break;
case 'w':
cols = strtol(optarg, &num, 0) >> 1;
Expand All @@ -100,10 +98,8 @@ int main(int argc, char *argv[])
printf(USAGE);
exit(1);
}
if (cols == 0) {
adjust_to_width = 1;
}
break;
adjust_to_width = 1;
break;
case 'l':
loops = strtol(optarg, &num, 0);
break;
Expand Down

0 comments on commit 860e13b

Please sign in to comment.