diff options
author | Leo C | 2018-05-27 22:06:51 +0200 |
---|---|---|
committer | Leo C | 2018-05-27 22:06:51 +0200 |
commit | dbd0d34e68c73b9d3628cc1a1bda0b883976fc8b (patch) | |
tree | c149ed09071dd56d631f89343658e4fe62029f15 /fatfs | |
parent | 289f6a146c0b2087607d8d8659531ea90142779a (diff) | |
download | z180-stamp-dbd0d34e68c73b9d3628cc1a1bda0b883976fc8b.zip |
Apply patch ff13b_p1fatfs-0.13b_p1
Diffstat (limited to 'fatfs')
-rw-r--r-- | fatfs/source/ff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fatfs/source/ff.c b/fatfs/source/ff.c index a114c6b..c57a320 100644 --- a/fatfs/source/ff.c +++ b/fatfs/source/ff.c @@ -1728,7 +1728,8 @@ static FRESULT dir_next ( /* FR_OK(0):succeeded, FR_NO_FILE:End of table, FR_DEN ofs = dp->dptr + SZDIRE; /* Next entry */
- if (dp->sect == 0 || ofs >= (DWORD)((FF_FS_EXFAT && fs->fs_type == FS_EXFAT) ? MAX_DIR_EX : MAX_DIR)) return FR_NO_FILE; /* Report EOT when offset has reached max value */
+ if (ofs >= (DWORD)((FF_FS_EXFAT && fs->fs_type == FS_EXFAT) ? MAX_DIR_EX : MAX_DIR)) dp->sect = 0; /* Disable it if the offset reached the max value */
+ if (dp->sect == 0) return FR_NO_FILE; /* Report EOT if it has been disabled */
if (ofs % SS(fs) == 0) { /* Sector changed? */
dp->sect++; /* Next sector */
|