diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-02-03 22:33:16 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-02-03 22:33:16 +0000 |
commit | 72612ea6b8605d407568b95a82d6b9f42e4635bb (patch) | |
tree | 2e86c733a4c8e8cc0683242a2dee6ce2415284db /firmware/drivers/fat.c | |
parent | c3ab85cbfbbf8f752a57badf0d148db35f042b26 (diff) |
Fixed max_cluster calculation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5765 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/fat.c')
-rw-r--r-- | firmware/drivers/fat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 78aebd2e2b..022e3ebf90 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c @@ -265,8 +265,8 @@ static long cluster2sec(IF_MV2(struct bpb* fat_bpb,) long cluster) #else const long zerocluster = 2; #endif - long max_cluster = fat_bpb->totalsectors - - fat_bpb->firstdatasector / fat_bpb->bpb_secperclus + 1; + long max_cluster = (fat_bpb->totalsectors - + fat_bpb->firstdatasector) / fat_bpb->bpb_secperclus + 1; if (cluster > max_cluster) |