diff --git a/IPA.Injector/Injector.cs b/IPA.Injector/Injector.cs index ca383d5e..572b06b4 100644 --- a/IPA.Injector/Injector.cs +++ b/IPA.Injector/Injector.cs @@ -86,7 +86,7 @@ namespace IPA.Injector CriticalSection.Configure(); injector.Debug("Prepping bootstrapper"); - + // updates backup InstallBootstrapPatch(); diff --git a/IPA.Loader/Logging/StdoutInterceptor.cs b/IPA.Loader/Logging/StdoutInterceptor.cs index fca129b0..31efdae2 100644 --- a/IPA.Loader/Logging/StdoutInterceptor.cs +++ b/IPA.Loader/Logging/StdoutInterceptor.cs @@ -124,12 +124,21 @@ namespace IPA.Logging var setFg = foregroundProperty?.GetSetMethod(); var getFg = foregroundProperty?.GetGetMethod(); - if (resetColor != null) - harmony.Patch(resetColor, transpiler: new HarmonyMethod(typeof(ConsoleHarmonyPatches), nameof(PatchResetColor))); - if (foregroundProperty != null) + try { - harmony.Patch(setFg, transpiler: new HarmonyMethod(typeof(ConsoleHarmonyPatches), nameof(PatchSetForegroundColor))); - harmony.Patch(getFg, transpiler: new HarmonyMethod(typeof(ConsoleHarmonyPatches), nameof(PatchGetForegroundColor))); + if (resetColor != null) + harmony.Patch(resetColor, transpiler: new HarmonyMethod(typeof(ConsoleHarmonyPatches), nameof(PatchResetColor))); + if (foregroundProperty != null) + { + harmony.Patch(setFg, transpiler: new HarmonyMethod(typeof(ConsoleHarmonyPatches), nameof(PatchSetForegroundColor))); + harmony.Patch(getFg, transpiler: new HarmonyMethod(typeof(ConsoleHarmonyPatches), nameof(PatchGetForegroundColor))); + } + } + catch (Exception e) + { + // Harmony might be fucked because of wierdness in Guid.NewGuid, don't let that kill us + Logger.log.Error("Error installing harmony patches to intercept Console color properties:"); + Logger.log.Error(e); } } diff --git a/Refs/UnityEngine.CoreModule.Net4.dll b/Refs/UnityEngine.CoreModule.Net4.dll index 0dd52a4c..7e2d6955 100644 Binary files a/Refs/UnityEngine.CoreModule.Net4.dll and b/Refs/UnityEngine.CoreModule.Net4.dll differ