Skip to content

Commit

Permalink
fix: necessary IL being removed
Browse files Browse the repository at this point in the history
  • Loading branch information
GhilleAU committed Jun 14, 2024
1 parent 64fbab3 commit 0e835b1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public static IEnumerable<CodeInstruction> Transpile(IEnumerable<CodeInstruction
var replacementIdx = GetSequenceStartIndex(instructionsList, _replacementSequenceToFind);
if (replacementIdx < 0) throw new Exception($"Failed to find replacement injection index for {nameof(InvokeHandlerBase_DoTick_Patch)}");

instructionsList.RemoveRange(replacementIdx + 1, _replacementSequenceToFind.Length - 1);
instructionsList.RemoveRange(replacementIdx + 1, _replacementSequenceToFind.Length - 2);
instructionsList.InsertRange(replacementIdx + 1, new CodeInstruction[]
{
new CodeInstruction(OpCodes.Call, methodToCallInfo)
Expand Down

0 comments on commit 0e835b1

Please sign in to comment.