test fork
Dependencies: SPI_TFTx2 SPI_TFTx2_ILI9341 TFT_fonts TOUCH_TFTx2 mbed
Fork of CANary_9341 by
Diff: CHAN_FS/ff.c
- Branch:
- Metric
- Revision:
- 110:ffddff3ad2f2
- Parent:
- 109:3e6f0e8fca0d
diff -r 3e6f0e8fca0d -r ffddff3ad2f2 CHAN_FS/ff.c --- a/CHAN_FS/ff.c Sun Jun 30 17:52:58 2013 +0000 +++ b/CHAN_FS/ff.c Sun Jun 30 19:52:38 2013 +0000 @@ -2112,11 +2112,12 @@ if (res != FR_OK) LEAVE_FF(fp->fs, res); if (fp->flag & FA__ERROR) /* Check abort flag */ LEAVE_FF(fp->fs, FR_INT_ERR); - if (ofs > fp->fsize /* In read-only mode, clip offset with the file size */ -#if !_FS_READONLY - && !(fp->flag & FA_WRITE) -#endif - ) ofs = fp->fsize; +// if (ofs > fp->fsize /* In read-only mode, clip offset with the file size */ +//#if !_FS_READONLY /* LAJ: Always clip offset with file size */ +// && !(fp->flag & FA_WRITE) +//#endif + if (ofs > fp->fsize) + ofs = fp->fsize; /* LAJ: Always clip offset with file size */ ifptr = fp->fptr; fp->fptr = nsect = 0; fp->csect = 255;