From d1de4f8d3856135e361d06369f1e8610658354df Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Mon, 15 Jul 2002 23:39:06 +0000 Subject: Fixed name garbling bug git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1363 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/fat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'firmware') 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) { firstbyte = dir->cached_buf[i*32]; - if(firstbyte == 0xe5) + if(firstbyte == 0xe5) { /* free entry */ + sectoridx = 0; continue; + } if(firstbyte == 0) { /* last entry */ @@ -1054,6 +1056,7 @@ int fat_getnext(struct fat_dir *dir, struct fat_direntry *entry) entry->name[l]=0; } done = 1; + sectoridx = 0; break; } } -- cgit v1.2.3