diff options
| author | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-03-07 14:38:30 +0000 |
|---|---|---|
| committer | Jean-Philippe Bernardy <jeanphilippe.bernardy@gmail.com> | 2005-03-07 14:38:30 +0000 |
| commit | d1c459c746ab79c9bfb6b84aed2e7f60b57db94f (patch) | |
| tree | a9c79352a26cd582f2e5db3d8cf443f5146fca63 | |
| parent | c71db259dc198a26aadba017d29fc7c8b76be194 (diff) | |
| download | rockbox-d1c459c746ab79c9bfb6b84aed2e7f60b57db94f.zip rockbox-d1c459c746ab79c9bfb6b84aed2e7f60b57db94f.tar.gz rockbox-d1c459c746ab79c9bfb6b84aed2e7f60b57db94f.tar.bz2 rockbox-d1c459c746ab79c9bfb6b84aed2e7f60b57db94f.tar.xz | |
Little fix, when debug is disabled clusterchain length was incorrectly computed
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6163 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | firmware/drivers/fat.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index df89db3..79b9dc0 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -1782,8 +1782,10 @@ int fat_closewrite(struct fat_file *file, long size, int attr) long len; long next; for ( next = file->firstcluster; next; - next = get_next_cluster(IF_MV2(fat_bpb,) next) ) - LDEBUGF("cluster %ld: %lx\n", count++, next); + next = get_next_cluster(IF_MV2(fat_bpb,) next) ) { + LDEBUGF("cluster %ld: %lx\n", count, next); + count++; + } len = count * fat_bpb->bpb_secperclus * SECTOR_SIZE; LDEBUGF("File is %ld clusters (chainlen=%ld, size=%ld)\n", count, len, size ); |