fixed bug in first_data_offset
This commit is contained in:
parent
99bb1e25c2
commit
905d8a61cc
1 changed files with 1 additions and 5 deletions
|
|
@ -250,12 +250,8 @@ impl Bpb {
|
||||||
|
|
||||||
/// first data sector
|
/// first data sector
|
||||||
pub fn first_data_sector(&self) -> u32 {
|
pub fn first_data_sector(&self) -> u32 {
|
||||||
println!("reserved sectors: {}", self.reserved_sector_count());
|
|
||||||
println!("fat sectors: {}", self.num_fats() as u32 * self.fat_size());
|
|
||||||
println!("root dir sectors: {}", self.root_dir_sectors());
|
|
||||||
|
|
||||||
self.reserved_sector_count() as u32
|
self.reserved_sector_count() as u32
|
||||||
+ (self.num_fats() as u32 + self.fat_size())
|
+ (self.num_fats() as u32 * self.fat_size())
|
||||||
+ self.root_dir_sectors() as u32
|
+ self.root_dir_sectors() as u32
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue