Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Strip Optional attribute off unstripped ICall delegates
Browse files Browse the repository at this point in the history
  • Loading branch information
knah committed Jan 4, 2022
1 parent f5fa957 commit f1adce3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion AssemblyUnhollower/AssemblyUnhollower.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>Exe</OutputType>
<TargetFrameworks>net4.7.2;net5.0;netstandard2.1</TargetFrameworks>
<Nullable>enable</Nullable>
<Version>0.4.17.0</Version>
<Version>0.4.17.1</Version>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion AssemblyUnhollower/Utils/UnstripGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static TypeDefinition CreateDelegateTypeForICallMethod(MethodDefinition u
invokeMethod.Parameters.Add(new ParameterDefinition("@this", ParameterAttributes.None, imports.IntPtr));
foreach (var convertedParameter in convertedMethod.Parameters)
invokeMethod.Parameters.Add(new ParameterDefinition(convertedParameter.Name,
convertedParameter.Attributes,
convertedParameter.Attributes & ~ParameterAttributes.Optional,
convertedParameter.ParameterType.IsValueType ? convertedParameter.ParameterType : imports.IntPtr));

return delegateType;
Expand Down
1 change: 1 addition & 0 deletions ReleaseChangelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ This is a small feature update. Generated assemblies should be fully compatible
New features:
* PDB generator project (not bundled in release zip) - see README
* New CLI option `--add-prefix-to` to add Il2Cpp prefix to additional assemblies and namespaces to prevent conflicts with managed libs.
* 0.4.17.1 - strip Optional attribute off unstripped ICall delegates as Mono crashed on those

0 comments on commit f1adce3

Please sign in to comment.