From b491dfb49959b20556c9055ad11cb0bd3466ac61 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sun, 28 Jul 2019 04:53:30 +0100 Subject: [PATCH] Fix size for fields in Apple extensions to ISO9660. --- .../ISO9660/Structs/Apple.cs | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/DiscImageChef.Filesystems/ISO9660/Structs/Apple.cs b/DiscImageChef.Filesystems/ISO9660/Structs/Apple.cs index 3c7a955c9..3bb1bd151 100644 --- a/DiscImageChef.Filesystems/ISO9660/Structs/Apple.cs +++ b/DiscImageChef.Filesystems/ISO9660/Structs/Apple.cs @@ -40,66 +40,66 @@ namespace DiscImageChef.Filesystems.ISO9660 [StructLayout(LayoutKind.Sequential, Pack = 1)] struct AppleProDOSSystemUse { - public ushort signature; - public byte length; - public AppleId id; - public byte type; - public ushort aux_type; + public readonly ushort signature; + public readonly byte length; + public readonly AppleId id; + public readonly byte type; + public readonly ushort aux_type; } // Big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] struct AppleHFSSystemUse { - public ushort signature; - public byte length; - public AppleId id; - public ushort type; - public ushort creator; - public ushort finder_flags; + public readonly ushort signature; + public readonly byte length; + public readonly AppleId id; + public readonly uint type; + public readonly uint creator; + public readonly ushort finder_flags; } // Little-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] struct AppleProDOSOldSystemUse { - public ushort signature; - public AppleOldId id; - public byte type; - public ushort aux_type; + public readonly ushort signature; + public readonly AppleOldId id; + public readonly byte type; + public readonly ushort aux_type; } // Big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] struct AppleHFSTypeCreatorSystemUse { - public ushort signature; - public AppleOldId id; - public ushort type; - public ushort creator; + public readonly ushort signature; + public readonly AppleOldId id; + public readonly uint type; + public readonly uint creator; } // Big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] struct AppleHFSIconSystemUse { - public ushort signature; - public AppleOldId id; - public ushort type; - public ushort creator; + public readonly ushort signature; + public readonly AppleOldId id; + public readonly uint type; + public readonly uint creator; [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] - public byte[] icon; + public readonly byte[] icon; } // Big-endian [StructLayout(LayoutKind.Sequential, Pack = 1)] struct AppleHFSOldSystemUse { - public ushort signature; - public AppleOldId id; - public ushort type; - public ushort creator; - public ushort finder_flags; + public readonly ushort signature; + public readonly AppleOldId id; + public readonly uint type; + public readonly uint creator; + public readonly ushort finder_flags; } } } \ No newline at end of file