[Diskdupe] Change to little endian marshaller (uses only bytes)

This commit is contained in:
2025-10-21 11:02:31 +01:00
parent c0c76f183e
commit 29e2aebaf1
2 changed files with 7 additions and 7 deletions

View File

@@ -77,7 +77,7 @@ public sealed partial class DiskDupe
for(int i = 0; i < numTracks; i++)
{
stream.EnsureRead(buffer, 0, 6);
trackMap[i] = Marshal.ByteArrayToStructureBigEndian<TrackInfo>(buffer);
trackMap[i] = Marshal.ByteArrayToStructureLittleEndian<TrackInfo>(buffer);
trackOffsets[i] = trackLen * trackMap[i].trackNumber;
}

View File

@@ -106,12 +106,12 @@ public sealed partial class DiskDupe
[StructLayout(LayoutKind.Sequential, Pack = 1)]
struct TrackInfo
{
public readonly byte present; // 1 = present, 0 = absent
public readonly byte trackNumber;
public readonly byte zero1;
public readonly byte zero2;
public readonly byte zero3;
public readonly byte unknown; // always 1?
public byte present; // 1 = present, 0 = absent
public byte trackNumber;
public byte zero1;
public byte zero2;
public byte zero3;
public byte unknown; // always 1?
}
#endregion