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

@@ -70,11 +70,7 @@ namespace DiscImageChef.Filesystems
information = "";
byte[] sector = imagePlugin.ReadSectors(partition.Start, 2);
PcfxHeader header = new PcfxHeader();
IntPtr sbPtr = Marshal.AllocHGlobal(Marshal.SizeOf(header));
Marshal.Copy(sector, 0, sbPtr, Marshal.SizeOf(header));
header = (PcfxHeader)Marshal.PtrToStructure(sbPtr, typeof(PcfxHeader));
Marshal.FreeHGlobal(sbPtr);
PcfxHeader header = Helpers.Marshal.ByteArrayToStructureLittleEndian<PcfxHeader>(sector);
string date;
DateTime dateTime = DateTime.MinValue;