diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/fat.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index ee0c8eef44..0072086389 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -992,9 +992,11 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry) | |||
992 | { | 992 | { |
993 | firstbyte = dir->cached_buf[i*32]; | 993 | firstbyte = dir->cached_buf[i*32]; |
994 | 994 | ||
995 | if(firstbyte == 0xe5) | 995 | if(firstbyte == 0xe5) { |
996 | /* free entry */ | 996 | /* free entry */ |
997 | sectoridx = 0; | ||
997 | continue; | 998 | continue; |
999 | } | ||
998 | 1000 | ||
999 | if(firstbyte == 0) { | 1001 | if(firstbyte == 0) { |
1000 | /* last entry */ | 1002 | /* last entry */ |
@@ -1054,6 +1056,7 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry) | |||
1054 | entry->name[l]=0; | 1056 | entry->name[l]=0; |
1055 | } | 1057 | } |
1056 | done = 1; | 1058 | done = 1; |
1059 | sectoridx = 0; | ||
1057 | break; | 1060 | break; |
1058 | } | 1061 | } |
1059 | } | 1062 | } |