Corrected partition arithmetics.

This commit is contained in:
2017-07-26 04:16:45 +01:00
parent 701b1f0824
commit e3cdf500f8

View File

@@ -75,14 +75,18 @@ namespace DiscImageChef.PartPlugins
{
Partition part = new Partition
{
Start = entry.p_boffset,
Offset = entry.p_boffset,
Start = (entry.p_boffset / imagePlugin.GetSectorSize()) + sectorOffset,
Offset = entry.p_boffset + (sectorOffset * imagePlugin.GetSectorSize()),
Size = entry.p_bsize,
Length = entry.p_bsize,
Length = (entry.p_bsize / imagePlugin.GetSectorSize()),
Name = entry.p_stor_uuid.ToString(),
Sequence = counter,
Scheme = Name
};
if((entry.p_bsize % imagePlugin.GetSectorSize()) > 0)
part.Length++;
if((BSD.fsType)entry.p_fstype == BSD.fsType.Other)
part.Type = entry.p_type_uuid.ToString();
else