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

Commit

Permalink
Fix invalid IL in setters for non-blittable-value-type non-generic fi…
Browse files Browse the repository at this point in the history
…elds
  • Loading branch information
knah committed Feb 22, 2022
1 parent c10c999 commit f583252
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions AssemblyUnhollower/UtilGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ public static void EmitObjectStore(this ILProcessor body, TypeReference original
var classPointerFieldRef = new FieldReference(nameof(Il2CppClassPointerStore<int>.NativeClassPtr), imports.IntPtr, classPointerTypeRef);
body.Emit(OpCodes.Ldsfld, enclosingType.NewType.Module.ImportReference(classPointerFieldRef));
body.Emit(OpCodes.Ldc_I4_0);
body.Emit(OpCodes.Conv_U);
body.Emit(OpCodes.Call, imports.ValueSizeGet);
body.Emit(OpCodes.Cpblk);
body.Emit(OpCodes.Pop);
Expand Down
4 changes: 2 additions & 2 deletions ReleaseChangelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
This is a small bugfix update. Generated assemblies should be fully compatible with those generated by 0.4.17.x.

New features:
* Fixed compatibility with Unity versions 2021.2.0 and above

* Fixed compatibility with Unity versions 2021.2.0 and above
* Fixed setters of non-blittable-value-type non-generic fields having invalid IL

0 comments on commit f583252

Please sign in to comment.