diff options
Diffstat (limited to 'file_use.c')
-rw-r--r-- | file_use.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -170,8 +170,8 @@ f_file* f_file_open( const char *fname, int flags ) { f_file *ret = NULL; - char *f_flags_write="r"; - char *f_flags_read="w"; + char *f_flags_write="w"; + char *f_flags_read="r"; char *f_flags_rw="r+"; char *f_flags_tmp=NULL; @@ -207,7 +207,7 @@ f_file* f_file_open( const char *fname, int flags ) ERROR("Unknown flag for opening \n"); goto exit_close_f; } - ret->fid = fopen( fname, "r" ); + ret->fid = fopen( fname, f_flags_tmp ); if ( ret->fid == NULL ) { ERROR("Cannot open file\n"); |