Truncate file on writing, or we keep garbage at the end...

This commit is contained in:
Stefan `Sec` Zehl 2011-08-02 23:54:07 +02:00
parent 080cffff23
commit f176bed03f
1 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,7 @@ int writeFile(char * filename, char * data, int len){
UINT writebytes;
int res;
res=f_open(&file, filename, FA_OPEN_ALWAYS|FA_WRITE);
res=f_open(&file, filename, FA_CREATE_ALWAYS|FA_WRITE);
if(res){
return -1;
};