forked from len0rd/rockbox
Fixed max_cluster calculation
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5765 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
c3ab85cbfb
commit
72612ea6b8
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue