From 789835544bd754b79e67147f2303b657aca0d743 Mon Sep 17 00:00:00 2001 From: tomsmeding Date: Thu, 2 Nov 2017 10:33:15 +0100 Subject: Actually write destination files --- bin2c.c | 2 +- c2bin.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin2c.c b/bin2c.c index 48ebae7..9cd9f0e 100644 --- a/bin2c.c +++ b/bin2c.c @@ -123,7 +123,7 @@ int main(int argc,char **argv){ if(strcmp(argv[2],"-")==0){ fout=stdout; } else { - fout=fopen(argv[2],"rb"); + fout=fopen(argv[2],"wb"); if(!fout){ fprintf(stderr,"Could not open file '%s'\n",argv[2]); return 1; diff --git a/c2bin.c b/c2bin.c index b15ee88..ac2a4ca 100644 --- a/c2bin.c +++ b/c2bin.c @@ -146,7 +146,7 @@ int main(int argc,char **argv){ if(strcmp(argv[2],"-")==0){ fout=stdout; } else { - fout=fopen(argv[2],"rb"); + fout=fopen(argv[2],"wb"); if(!fout){ fprintf(stderr,"Could not open file '%s'\n",argv[2]); return 1; -- cgit v1.2.3-70-g09d2