Skip to content

Commit

Permalink
fixes CodeMatch(()=>...)
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike authored Jul 22, 2023
1 parent c2586e7 commit 7e4183e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Harmony/Tools/CodeMatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ public CodeMatch(Expression<Action> expression, string name = null)
{
opcodeSet.UnionWith(CodeInstructionExtensions.opcodesCalling);
operand = SymbolExtensions.GetMethodInfo(expression);
if (operand != null)
operands.Add(operand);
this.name = name;
}

Expand All @@ -103,6 +105,8 @@ public CodeMatch(LambdaExpression expression, string name = null)
{
opcodeSet.UnionWith(CodeInstructionExtensions.opcodesCalling);
operand = SymbolExtensions.GetMethodInfo(expression);
if (operand != null)
operands.Add(operand);
this.name = name;
}

Expand Down

0 comments on commit 7e4183e

Please sign in to comment.