Use new little endian marshaller on filesystems.

This commit is contained in:
2019-03-01 00:28:55 +00:00
parent f95633046e
commit 0ec558da55
45 changed files with 154 additions and 531 deletions

View File

@@ -77,10 +77,7 @@ namespace DiscImageChef.Filesystems
switch(magic)
{
case CRAM_MAGIC:
IntPtr crSbPtr = Marshal.AllocHGlobal(Marshal.SizeOf(crSb));
Marshal.Copy(sector, 0, crSbPtr, Marshal.SizeOf(crSb));
crSb = (CramSuperBlock)Marshal.PtrToStructure(crSbPtr, typeof(CramSuperBlock));
Marshal.FreeHGlobal(crSbPtr);
crSb = Helpers.Marshal.ByteArrayToStructureLittleEndian<CramSuperBlock>(sector);
break;
case CRAM_CIGAM:
crSb = Helpers.Marshal.ByteArrayToStructureBigEndian<CramSuperBlock>(sector);