mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use new little endian marshaller on filesystems.
This commit is contained in:
@@ -59,10 +59,7 @@ namespace DiscImageChef.Filesystems
|
||||
|
||||
try
|
||||
{
|
||||
GCHandle handle = GCHandle.Alloc(sector, GCHandleType.Pinned);
|
||||
nxSb = (ApfsContainerSuperBlock)Marshal.PtrToStructure(handle.AddrOfPinnedObject(),
|
||||
typeof(ApfsContainerSuperBlock));
|
||||
handle.Free();
|
||||
nxSb = Helpers.Marshal.ByteArrayToStructureLittleEndian<ApfsContainerSuperBlock>(sector);
|
||||
}
|
||||
catch { return false; }
|
||||
|
||||
@@ -84,10 +81,7 @@ namespace DiscImageChef.Filesystems
|
||||
|
||||
try
|
||||
{
|
||||
GCHandle handle = GCHandle.Alloc(sector, GCHandleType.Pinned);
|
||||
nxSb = (ApfsContainerSuperBlock)Marshal.PtrToStructure(handle.AddrOfPinnedObject(),
|
||||
typeof(ApfsContainerSuperBlock));
|
||||
handle.Free();
|
||||
nxSb = Helpers.Marshal.ByteArrayToStructureLittleEndian<ApfsContainerSuperBlock>(sector);
|
||||
}
|
||||
catch { return; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user