Override Marshal.SizeOf in Helpers and use it instead of System's.

This commit is contained in:
2019-03-01 07:35:22 +00:00
parent 0ec558da55
commit e14c19279a
116 changed files with 1138 additions and 1182 deletions

View File

@@ -38,6 +38,7 @@ using DiscImageChef.CommonTypes.Enums;
using DiscImageChef.CommonTypes.Interfaces;
using DiscImageChef.Console;
using Schemas;
using Marshal = DiscImageChef.Helpers.Marshal;
namespace DiscImageChef.Filesystems
{
@@ -99,7 +100,7 @@ namespace DiscImageChef.Filesystems
byte[] hbSector = imagePlugin.ReadSector(1 + partition.Start);
OdsHomeBlock homeblock = Helpers.Marshal.ByteArrayToStructureLittleEndian<OdsHomeBlock>(hbSector);
OdsHomeBlock homeblock = Marshal.ByteArrayToStructureLittleEndian<OdsHomeBlock>(hbSector);
// Optical disc
if(imagePlugin.Info.XmlMediaType == XmlMediaType.OpticalDisc &&
@@ -112,7 +113,7 @@ namespace DiscImageChef.Filesystems
hbSector = new byte[0x200];
Array.Copy(tmp, 0x200, hbSector, 0, 0x200);
homeblock = Helpers.Marshal.ByteArrayToStructureLittleEndian<OdsHomeBlock>(hbSector);
homeblock = Marshal.ByteArrayToStructureLittleEndian<OdsHomeBlock>(hbSector);
if(StringHandlers.CToString(homeblock.format) != "DECFILE11A " &&
StringHandlers.CToString(homeblock.format) != "DECFILE11B ") return;