Skip to content

Commit

Permalink
Added binary mode to file operations.
Browse files Browse the repository at this point in the history
  • Loading branch information
jklmnn committed Nov 9, 2014
1 parent 2627005 commit 19b1c06
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ int main(int argc, char *argv[]){
FILE *out;
int filesize;
char *buf;
in = fopen(argv[2], "r");
out = fopen(argv[3], "w");
in = fopen(argv[2], "rb");
out = fopen(argv[3], "wb");
fseek(in, 0, SEEK_END);
filesize = ftell(in);
rewind(in);
Expand Down

0 comments on commit 19b1c06

Please sign in to comment.