Oops. We need to close the files, too.
This commit is contained in:
parent
29df9b9e1f
commit
f2c5d53cb9
|
@ -38,6 +38,8 @@ int readFile(char * filename, char * data, int len){
|
|||
return -1;
|
||||
};
|
||||
|
||||
f_close(&file);
|
||||
|
||||
data[readbytes]=0;
|
||||
return readbytes;
|
||||
};
|
||||
|
@ -56,6 +58,7 @@ int writeFile(char * filename, char * data, int len){
|
|||
if(res){
|
||||
return -1;
|
||||
};
|
||||
f_close(&file);
|
||||
|
||||
return writebytes;
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue