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,11 +77,7 @@ namespace DiscImageChef.Filesystems.AppleDOS
// Read the VTOC
vtocBlocks = device.ReadSector((ulong)(17 * sectorsPerTrack));
vtoc = new Vtoc();
IntPtr vtocPtr = Marshal.AllocHGlobal(256);
Marshal.Copy(vtocBlocks, 0, vtocPtr, 256);
vtoc = (Vtoc)Marshal.PtrToStructure(vtocPtr, typeof(Vtoc));
Marshal.FreeHGlobal(vtocPtr);
vtoc = Helpers.Marshal.ByteArrayToStructureLittleEndian<Vtoc>(vtocBlocks);
track1UsedByFiles = false;
track2UsedByFiles = false;