From 6384902d7e69de48ccdebd478b04d339576c9623 Mon Sep 17 00:00:00 2001 From: GhilleAU Date: Sat, 4 May 2024 09:51:14 +1000 Subject: [PATCH] fix: incorrect sequence IL - Rust made changes to HasPermission which caused the IL code to change --- .../HarmonyPatches/ConsoleSystem_Arg_HasPermission_Patch.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AdminRestrictions/HarmonyPatches/ConsoleSystem_Arg_HasPermission_Patch.cs b/src/AdminRestrictions/HarmonyPatches/ConsoleSystem_Arg_HasPermission_Patch.cs index 2828f80..cf2119c 100644 --- a/src/AdminRestrictions/HarmonyPatches/ConsoleSystem_Arg_HasPermission_Patch.cs +++ b/src/AdminRestrictions/HarmonyPatches/ConsoleSystem_Arg_HasPermission_Patch.cs @@ -62,7 +62,7 @@ public static class ConsoleSystem_Arg_HasPermission_Patch { new CodeInstruction(OpCodes.Ldarg_0), new CodeInstruction(OpCodes.Call, typeof(ConsoleSystem.Arg).GetProperty(nameof(ConsoleSystem.Arg.IsAdmin), BindingFlags.Instance | BindingFlags.Public).GetGetMethod()), - new CodeInstruction(OpCodes.Brfalse), + new CodeInstruction(OpCodes.Brfalse_S), new CodeInstruction(OpCodes.Ldc_I4_1) };