Skip to content

Commit

Permalink
Try reading in "binary" mode to appease MS Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerb9 committed Jul 17, 2024
1 parent 33b9041 commit 83a7662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bacmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ int main(int argc, char *argv[]) {
}

FILE *fa, *fb;
if ( (fa = fopen(argv[1], "r")) == NULL)
if ( (fa = fopen(argv[1], "rb")) == NULL)
fprintf(stderr, "Could not open file: <%s>\n", argv[1]);
if ( (fb = fopen(argv[2], "r")) == NULL)
if ( (fb = fopen(argv[2], "rb")) == NULL)
fprintf(stderr, "Could not open file: <%s>\n", argv[2]);
if (fa == NULL || fb == NULL) {
exit(1);
Expand Down

0 comments on commit 83a7662

Please sign in to comment.