Fix skipping sectors at computing the number of free clusters
Double increment of sector made computation skipping every second sector and to go beyond fat-table!
This commit is contained in:
parent
1d940b2982
commit
104bbc50e7
|
@ -2074,7 +2074,7 @@ int fat_computefreeclusters(struct fat_mountpt_s *fs)
|
|||
|
||||
if (offset >= fs->fs_hwsectorsize)
|
||||
{
|
||||
ret = fat_fscacheread(fs, fatsector++);
|
||||
ret = fat_fscacheread(fs, fatsector);
|
||||
if (ret < 0)
|
||||
{
|
||||
return ret;
|
||||
|
@ -2154,7 +2154,7 @@ int fat_nfreeclusters(struct fat_mountpt_s *fs, off_t *pfreeclusters)
|
|||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: fat_nfreeclusters
|
||||
* Name: fat_currentsector
|
||||
*
|
||||
* Description:
|
||||
* Given the file position, set the correct current sector to access.
|
||||
|
|
Loading…
Reference in New Issue