Skip to content

Commit

Permalink
Update Example6.cs
Browse files Browse the repository at this point in the history
resolve System.InvalidOperationException:“Reloc section must be the last section, use AddSection() to add a section”
  • Loading branch information
Y4er authored Oct 26, 2023
1 parent 185557c commit 0105e6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Examples/Example6.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void OnWriterEvent(object sender, ModuleWriterEventArgs e) {
case ModuleWriterEvent.PESectionsCreated:
// Add a PE section
var sect1 = new PESection(".dummy", 0x40000040);
e.Writer.Sections.Add(sect1);
e.Writer.AddSection(sect1);
// Let's add data
sect1.Add(new ByteArrayChunk(new byte[123]), 4);
sect1.Add(new ByteArrayChunk(new byte[10]), 4);
Expand Down

0 comments on commit 0105e6b

Please sign in to comment.