This project is read-only.

BiosExtendedPartitionTable.cs - GetMetadataDiskExtents. Need to cast partPos to a long

Jun 6, 2011 at 3:14 PM

Hi Ken,

I added this to the work item (5220), but not sure if it needs to be here as the work item is 'fixed':

Found one problem:

BiosExtendedPartitionTable.cs - GetMetadataDiskExtents:

When you add to extents, the start needs to be casted to a long or it is putting in the wrong number, because partPos is a uint, you need to cast uint to be a long before the *
while (partPos != 0)            {
                extents.Add(new StreamExtent(partPos * Utilities.SectorSize, Utilities.SectorSize));
needs to be:
 while (partPos != 0)            {
                extents.Add(new StreamExtent(((long)partPos) * Utilities.SectorSize, Utilities.SectorSize));

Many Thanks,

Jun 6, 2011 at 7:44 PM

Thanks Mark - I make that mistake embarassingly often...

I've uploaded change 07647c0c2e47 with your fix.