Oops. We need to close the files, too.

This commit is contained in:
Stefan `Sec` Zehl 2011-08-01 01:55:04 +02:00
parent 29df9b9e1f
commit f2c5d53cb9
1 changed files with 3 additions and 0 deletions

View File

@ -38,6 +38,8 @@ int readFile(char * filename, char * data, int len){
return -1; return -1;
}; };
f_close(&file);
data[readbytes]=0; data[readbytes]=0;
return readbytes; return readbytes;
}; };
@ -56,6 +58,7 @@ int writeFile(char * filename, char * data, int len){
if(res){ if(res){
return -1; return -1;
}; };
f_close(&file);
return writebytes; return writebytes;
}; };