Browse Source

Added tailcall prefix to patches in stdout interceptor patches

pull/13/head
Anairkoen Schno 5 years ago
parent
commit
d8791127b8
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      IPA.Loader/Logging/StdoutInterceptor.cs

+ 3
- 0
IPA.Loader/Logging/StdoutInterceptor.cs View File

@ -137,6 +137,7 @@ namespace IPA.Logging
{
var getColorM = typeof(ConsoleHarmonyPatches).GetMethod("GetColor");
return new[] {
new CodeInstruction(OpCodes.Tailcall),
new CodeInstruction(OpCodes.Call, getColorM),
new CodeInstruction(OpCodes.Ret)
};
@ -147,6 +148,7 @@ namespace IPA.Logging
var setColorM = typeof(ConsoleHarmonyPatches).GetMethod("SetColor");
return new[] {
new CodeInstruction(OpCodes.Ldarg_0),
new CodeInstruction(OpCodes.Tailcall),
new CodeInstruction(OpCodes.Call, setColorM),
new CodeInstruction(OpCodes.Ret)
};
@ -156,6 +158,7 @@ namespace IPA.Logging
{
var resetColor = typeof(ConsoleHarmonyPatches).GetMethod("ResetColor");
return new[] {
new CodeInstruction(OpCodes.Tailcall),
new CodeInstruction(OpCodes.Call, resetColor),
new CodeInstruction(OpCodes.Ret)
};


Loading…
Cancel
Save