diff options
| -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 ); |