Skip to content

Commit

Permalink
fix invalid IlCode when returning default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Eddio0141 committed Nov 5, 2024
1 parent 7283449 commit afbc716
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions UniTAS/Patcher/Utils/ILCodeUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ public static void ReturnDefaultValueOnMethod(MethodDefinition method, ILProcess

il.Emit(OpCodes.Ldloca, retVar);
il.Emit(OpCodes.Initobj, retType);
il.Emit(OpCodes.Ldloc, retVar);
}
else
{
Expand Down

0 comments on commit afbc716

Please sign in to comment.