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,10 +33,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using DiscImageChef.CommonTypes.Enums;
|
||||
using DiscImageChef.CommonTypes.Interfaces;
|
||||
using DiscImageChef.Console;
|
||||
using DiscImageChef.Helpers;
|
||||
|
||||
namespace DiscImageChef.DiscImages
|
||||
{
|
||||
@@ -61,10 +61,9 @@ namespace DiscImageChef.DiscImages
|
||||
{
|
||||
long thisOffset = stream.Position;
|
||||
|
||||
DfiBlockHeader blockHeader = new DfiBlockHeader();
|
||||
byte[] blk = new byte[Marshal.SizeOf(blockHeader)];
|
||||
stream.Read(blk, 0, Marshal.SizeOf(blockHeader));
|
||||
blockHeader = Helpers.Marshal.ByteArrayToStructureBigEndian<DfiBlockHeader>(blk);
|
||||
byte[] blk = new byte[Marshal.SizeOf<DfiBlockHeader>()];
|
||||
stream.Read(blk, 0, Marshal.SizeOf<DfiBlockHeader>());
|
||||
DfiBlockHeader blockHeader = Marshal.ByteArrayToStructureBigEndian<DfiBlockHeader>(blk);
|
||||
|
||||
DicConsole.DebugWriteLine("DiscFerret plugin", "block@{0}.cylinder = {1}", thisOffset,
|
||||
blockHeader.cylinder);
|
||||
|
||||
Reference in New Issue
Block a user