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

@@ -37,6 +37,7 @@ using DiscImageChef.Checksums;
using DiscImageChef.CommonTypes;
using DiscImageChef.CommonTypes.Interfaces;
using Schemas;
using Marshal = DiscImageChef.Helpers.Marshal;
namespace DiscImageChef.Filesystems
{
@@ -82,7 +83,7 @@ namespace DiscImageChef.Filesystems
byte[] ntfsBpb = imagePlugin.ReadSector(0 + partition.Start);
NtfsBootBlock ntfsBb = Helpers.Marshal.ByteArrayToStructureLittleEndian<NtfsBootBlock>(ntfsBpb);
NtfsBootBlock ntfsBb = Marshal.ByteArrayToStructureLittleEndian<NtfsBootBlock>(ntfsBpb);
sb.AppendFormat("{0} bytes per sector", ntfsBb.bps).AppendLine();
sb.AppendFormat("{0} sectors per cluster ({1} bytes)", ntfsBb.spc, ntfsBb.spc * ntfsBb.bps).AppendLine();