From eb00b9971cea79c1959ab4cae5c814c89920801a Mon Sep 17 00:00:00 2001 From: Andrii Kurdiumov Date: Sun, 15 Mar 2026 10:47:47 +0100 Subject: [PATCH] Update dnlib to 4.5.0 I introduce fake alignment, since we don't care about it, and it's actually used only to checking for max alignment from what I see in dnlib --- Confuser.Core/Confuser.Core.csproj | 2 +- Confuser.Protections/AntiTamper/JITBody.cs | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Confuser.Core/Confuser.Core.csproj b/Confuser.Core/Confuser.Core.csproj index 2e7042530..1daf63ceb 100644 --- a/Confuser.Core/Confuser.Core.csproj +++ b/Confuser.Core/Confuser.Core.csproj @@ -13,7 +13,7 @@ - + diff --git a/Confuser.Protections/AntiTamper/JITBody.cs b/Confuser.Protections/AntiTamper/JITBody.cs index ae306d349..d200545cd 100644 --- a/Confuser.Protections/AntiTamper/JITBody.cs +++ b/Confuser.Protections/AntiTamper/JITBody.cs @@ -50,7 +50,10 @@ public uint GetVirtualSize() { public void WriteTo(DataWriter writer) { writer.WriteUInt32((uint)(Body.Length >> 2)); writer.WriteBytes(Body); - } + } + + /// + public uint CalculateAlignment() => 0; public void Serialize(uint token, uint key, byte[] fieldLayout) { using (var ms = new MemoryStream()) { @@ -233,7 +236,10 @@ public void WriteTo(DataWriter writer) { Debug.Assert((length + entry.Value.Offset) % 4 == 0); writer.WriteUInt32((length + entry.Value.Offset) >> 2); } - } + } + + /// + public uint CalculateAlignment() => 0; public void Add(uint token, JITMethodBody body) { Debug.Assert(bodies.ContainsKey(token)); @@ -252,4 +258,4 @@ public void PopulateSection(PESection section) { } } } -} \ No newline at end of file +}