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 SQUASH_MAGIC:
IntPtr sqSbPtr = Marshal.AllocHGlobal(Marshal.SizeOf(sqSb));
Marshal.Copy(sector, 0, sqSbPtr, Marshal.SizeOf(sqSb));
sqSb = (SquashSuperBlock)Marshal.PtrToStructure(sqSbPtr, typeof(SquashSuperBlock));
Marshal.FreeHGlobal(sqSbPtr);
sqSb = Helpers.Marshal.ByteArrayToStructureLittleEndian<SquashSuperBlock>(sector);
break;
case SQUASH_CIGAM:
sqSb = Helpers.Marshal.ByteArrayToStructureBigEndian<SquashSuperBlock>(sector);