mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Override Marshal.SizeOf in Helpers and use it instead of System's.
This commit is contained in:
@@ -33,11 +33,11 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using DiscImageChef.CommonTypes;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Helpers;
|
||||
using Schemas;
|
||||
|
||||
namespace DiscImageChef.Filesystems.CPM
|
||||
@@ -181,7 +181,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
|
||||
// Read the superblock
|
||||
AmstradSuperBlock amsSb =
|
||||
Helpers.Marshal.ByteArrayToStructureLittleEndian<AmstradSuperBlock>(sector, amsSbOffset, 16);
|
||||
Marshal.ByteArrayToStructureLittleEndian<AmstradSuperBlock>(sector, amsSbOffset, 16);
|
||||
|
||||
// Check that format byte and sidedness indicate the same number of sizes
|
||||
if(amsSb.format == 0 && (amsSb.sidedness & 0x02) == 0 ||
|
||||
@@ -297,8 +297,7 @@ namespace DiscImageChef.Filesystems.CPM
|
||||
if(sum == 0)
|
||||
{
|
||||
// Read the superblock
|
||||
HardDiskSuperBlock hddSb =
|
||||
Helpers.Marshal.ByteArrayToStructureLittleEndian<HardDiskSuperBlock>(sector);
|
||||
HardDiskSuperBlock hddSb = Marshal.ByteArrayToStructureLittleEndian<HardDiskSuperBlock>(sector);
|
||||
|
||||
// Calculate volume size
|
||||
sectorSize = (ulong)(hddSb.recordsPerSector * 128);
|
||||
|
||||
Reference in New Issue
Block a user