Ignore:
Timestamp:
9/30/2009 9:01:05 AM (5 years ago)
Author:
lowjoel
Message:

Got rid of the SectorSize? and ClusterSize? fields in the FatApi? class, replacing them with the values straight from the BootSector? field. For the rest of the protected fields, place them into properties to allow ABI compatibility.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6/Eraser.Util.FileSystem/Fat32Api.cpp

    r1238 r1239  
    6565        unsigned long long sector = BootSector->ReservedSectorCount +               //Reserved area 
    6666            BootSector->FatCount * BootSector->Fat32ParameterBlock.SectorsPerFat +  //FAT area 
    67             (static_cast<unsigned long long>(cluster) - 2) * (ClusterSize / SectorSize); 
     67            (static_cast<unsigned long long>(cluster) - 2) *  BootSector->SectorsPerCluster; 
    6868        return SectorToOffset(sector); 
    6969    } 
     
    105105                throw gcnew ArgumentException(L"Invalid FAT cluster: cluster is marked bad."); 
    106106            else if (fatPtr[cluster] >= 0x0FFFFFF8) 
    107                 return result * ClusterSize; 
     107                return ClusterSizeToSize(result); 
    108108            else 
    109109                cluster = fatPtr[cluster]; 
Note: See TracChangeset for help on using the changeset viewer.