mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-17 08:37:17 -04:00
Fix bug in offset computation
This commit is contained in:
parent
2c1cdcffa5
commit
3d0e50190b
@ -173,7 +173,7 @@ uint32_t read_fat_value(fat32::dd disk, uint32_t cluster){
|
|||||||
|
|
||||||
std::unique_heap_array<uint32_t> fat_table(512 / sizeof(uint32_t));
|
std::unique_heap_array<uint32_t> fat_table(512 / sizeof(uint32_t));
|
||||||
if(read_sectors(disk, fat_sector, 1, fat_table.get())){
|
if(read_sectors(disk, fat_sector, 1, fat_table.get())){
|
||||||
uint64_t entry_offset = cluster % 512;
|
uint64_t entry_offset = cluster % (512 / sizeof(uint32_t));
|
||||||
return fat_table[entry_offset] & 0x0FFFFFFF;
|
return fat_table[entry_offset] & 0x0FFFFFFF;
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user