mirror of
https://github.com/wiiu-env/libfat.git
synced 2024-11-01 00:05:06 +01:00
- if current sector is not in cache the starting sector to read from disc needs to be recalculated to be a multiple of sectorsPerPage
This commit is contained in:
parent
245ac2fee5
commit
5324215493
@ -139,6 +139,7 @@ static CACHE_ENTRY* _FAT_cache_getPage(CACHE *cache,sec_t sector)
|
||||
cacheEntries[oldUsed].dirty = false;
|
||||
}
|
||||
|
||||
sector = (sector/sectorsPerPage)*sectorsPerPage;
|
||||
if(!_FAT_disc_readSectors(cache->disc,sector,sectorsPerPage,cacheEntries[oldUsed].cache)) return NULL;
|
||||
|
||||
cacheEntries[oldUsed].sector = sector;
|
||||
|
Loading…
Reference in New Issue
Block a user