Truncate file on writing, or we keep garbage at the end...
This commit is contained in:
parent
080cffff23
commit
f176bed03f
|
@ -55,7 +55,7 @@ int writeFile(char * filename, char * data, int len){
|
||||||
UINT writebytes;
|
UINT writebytes;
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
res=f_open(&file, filename, FA_OPEN_ALWAYS|FA_WRITE);
|
res=f_open(&file, filename, FA_CREATE_ALWAYS|FA_WRITE);
|
||||||
if(res){
|
if(res){
|
||||||
return -1;
|
return -1;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue