diff --git a/DiscImageChef.DiscImages/DiscImageChef.cs b/DiscImageChef.DiscImages/DiscImageChef.cs index 0898cc92f..59c3f9997 100644 --- a/DiscImageChef.DiscImages/DiscImageChef.cs +++ b/DiscImageChef.DiscImages/DiscImageChef.cs @@ -761,7 +761,7 @@ namespace DiscImageChef.DiscImages imageStream.Read(structureBytes, 0, structureBytes.Length); structurePointer = Marshal.AllocHGlobal(Marshal.SizeOf(cicmBlock)); Marshal.Copy(structureBytes, 0, structurePointer, Marshal.SizeOf(cicmBlock)); - cicmBlock = (CicmMetadataBlock)Marshal.PtrToStructure(structurePointer, typeof(GeometryBlock)); + cicmBlock = (CicmMetadataBlock)Marshal.PtrToStructure(structurePointer, typeof(CicmMetadataBlock)); Marshal.FreeHGlobal(structurePointer); if(cicmBlock.identifier != BlockType.CicmBlock) break; @@ -895,8 +895,11 @@ namespace DiscImageChef.DiscImages for(uint j = 0; j < dumpEntry.extents; j++) { imageStream.Read(tmp, 0, tmp.Length); - dump.Extents[0].Start = BitConverter.ToUInt64(tmp, 0); - dump.Extents[0].End = BitConverter.ToUInt64(tmp, 8); + dump.Extents[j] = new ExtentType + { + Start = BitConverter.ToUInt64(tmp, 0), + End = BitConverter.ToUInt64(tmp, 8) + }; } dump.Extents = dump.Extents.OrderBy(t => t.Start).ToArray(); diff --git a/templates/dicformat.bt b/templates/dicformat.bt index aabc004ad..21fd42713 100644 --- a/templates/dicformat.bt +++ b/templates/dicformat.bt @@ -810,7 +810,7 @@ typedef struct uint length; uint64 crc64 ; DumpHardwareEntry dumpHardware[entries]; -} DumpHardwareHeader; +} DumpHardwareHeader ; typedef struct {