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

@@ -94,10 +94,7 @@ namespace DiscImageChef.Filesystems
byte[] sbSector = new byte[AFS_SUPERBLOCK_SIZE];
Array.Copy(tmp, offset, sbSector, 0, AFS_SUPERBLOCK_SIZE);
GCHandle handle = GCHandle.Alloc(sbSector, GCHandleType.Pinned);
AtheosSuperBlock afsSb =
(AtheosSuperBlock)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(AtheosSuperBlock));
handle.Free();
AtheosSuperBlock afsSb = Helpers.Marshal.ByteArrayToStructureLittleEndian<AtheosSuperBlock>(sbSector);
sb.AppendLine("Atheos filesystem");