Use new little endian marshaller on media images.

This commit is contained in:
2019-02-27 23:57:52 +00:00
parent 45be793491
commit 0fe8e3c11f
54 changed files with 320 additions and 705 deletions

View File

@@ -55,9 +55,7 @@ namespace DiscImageChef.DiscImages
byte[] hdrB = new byte[Marshal.SizeOf(v98Hdr)];
stream.Read(hdrB, 0, hdrB.Length);
GCHandle handle = GCHandle.Alloc(hdrB, GCHandleType.Pinned);
v98Hdr = (Virtual98Header)Marshal.PtrToStructure(handle.AddrOfPinnedObject(), typeof(Virtual98Header));
handle.Free();
v98Hdr = Helpers.Marshal.ByteArrayToStructureLittleEndian<Virtual98Header>(hdrB);
if(!v98Hdr.signature.SequenceEqual(signature)) return false;