file_fwrite incorrect coffset in v0.2.8
Brought to you by:
flecxie,
lennartyseboodt
In the case when the offset given to file_fwrite is > FileSize, the offset is set to FileSize but coffset is still initialized to the old value of offset.
This is easily corrected by making the assignment coffset=offset after the following check instead of before.
if(offset>file->FileSize){
offset=file->FileSize;
}
coffset=offset;