Skip to content

Commit

Permalink
fopen modes
Browse files Browse the repository at this point in the history
  • Loading branch information
arkku committed Mar 5, 2015
1 parent 4769642 commit 517b3eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ihex2bin.c
Expand Up @@ -69,7 +69,7 @@ main (int argc, char *argv[]) {
goto invalid_argument;
}
++argv;
if (!(infile = fopen(*argv, "rb"))) {
if (!(infile = fopen(*argv, "r"))) {
goto argument_error;
}
break;
Expand All @@ -78,7 +78,7 @@ main (int argc, char *argv[]) {
goto invalid_argument;
}
++argv;
if (!(outfile = fopen(*argv, "w"))) {
if (!(outfile = fopen(*argv, "wb"))) {
goto argument_error;
}
break;
Expand Down

0 comments on commit 517b3eb

Please sign in to comment.