File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
source/MetadataProcessor.Core Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,12 @@ public void Write(
6666 {
6767 // this replicates the original struct CLR_RECORD_ASSEMBLY
6868
69+ // marker
6970 writer . WriteString ( c_NFAssemblyMarker_v1 ) ;
7071
72+ // need to set position because marker could be shorter
73+ writer . BaseStream . Seek ( c_HeaderCrc32Position , SeekOrigin . Begin ) ;
74+
7175 // header CRC32
7276 writer . WriteUInt32 ( 0 ) ;
7377
@@ -79,12 +83,7 @@ public void Write(
7983 writer . WriteUInt32 ( 0 ) ;
8084
8185 // native methods CRC32
82- writer . WriteUInt32 ( writer . IsBigEndian ? _context . NativeMethodsCrc . Current : 0x00 ) ;
83-
84- // the existing MDP seems to have a bug because it's adding an extra byte at this place in the struct
85- // right between the NativeMethodsChecksum and PatchEntryOffset fields.
86- //// need this here to pad the structure in order to have a PE exactly as the one being generated now
87- //writer.WriteByte(0);
86+ writer . WriteUInt32 ( writer . IsBigEndian ? _context . NativeMethodsCrc . Current : 0 ) ;
8887
8988 // Native methods offset
9089 writer . WriteUInt32 ( 0xFFFFFFFF ) ;
You can’t perform that action at this time.
0 commit comments