for(;btw>0;btw-=wcnt,*bw+=wcnt,wbuff+=wcnt,fp->fptr+=wcnt,fp->obj.objsize=(fp->fptr>fp->obj.objsize)?fp->fptr:fp->obj.objsize){/* Repeat until all data written */
if(fp->fptr%SS(fs)==0){/* On the sector boundary? */
csect=(UINT)(fp->fptr/SS(fs))&(fs->csize-1);/* Sector offset in the cluster */
if(csect==0){/* On the cluster boundary? */
...
...
@@ -4066,12 +4017,12 @@ FRESULT f_write (
#if FF_FS_MINIMIZE <= 2
#if FF_FS_TINY
if(fs->winsect-sect<cc){/* Refill sector cache if it gets invalidated by the direct write */