Fix nullability warnings by initializing fields in constructors

This commit is contained in:
bird_egop
2025-04-12 18:05:31 +03:00
parent 79773b08aa
commit cf2d61915c
7 changed files with 86 additions and 3 deletions
+10
View File
@@ -26,5 +26,15 @@ namespace X86Disassembler.PE
public ushort e_oeminfo; // OEM information; e_oemid specific
public ushort[] e_res2; // Reserved words
public uint e_lfanew; // File address of new exe header
/// <summary>
/// Initializes a new instance of the DOSHeader class
/// </summary>
public DOSHeader()
{
// Initialize arrays to avoid nullability warnings
e_res = new ushort[4];
e_res2 = new ushort[10];
}
}
}