diff --git a/src/SMAPI/Patches/SaveGamePatch.cs b/src/SMAPI/Patches/SaveGamePatch.cs index 92718ee4..e3d0da3f 100644 --- a/src/SMAPI/Patches/SaveGamePatch.cs +++ b/src/SMAPI/Patches/SaveGamePatch.cs @@ -201,9 +201,9 @@ namespace StardewModdingAPI.Patches newInsns.Add(insn); Label continueLabel = gen.DefineLabel(); Label retLabel = gen.DefineLabel(); - newInsns.Add(new CodeInstruction(OpCodes.Ldarg_0)); + newInsns.Add(new CodeInstruction(OpCodes.Ldarg_1)); newInsns.Add(new CodeInstruction(OpCodes.Brfalse_S, retLabel)); - newInsns.Add(new CodeInstruction(OpCodes.Ldarg_0)); + newInsns.Add(new CodeInstruction(OpCodes.Ldarg_1)); newInsns.Add(new CodeInstruction(OpCodes.Call, AccessTools.PropertyGetter(typeof(string), nameof(string.Length)))); newInsns.Add(new CodeInstruction(OpCodes.Ldc_I4_0)); newInsns.Add(new CodeInstruction(OpCodes.Cgt)); diff --git a/src/SMAPI/Utilities/Keybind.cs b/src/SMAPI/Utilities/Keybind.cs index 2622f376..f33f086d 100644 --- a/src/SMAPI/Utilities/Keybind.cs +++ b/src/SMAPI/Utilities/Keybind.cs @@ -56,6 +56,8 @@ namespace StardewModdingAPI.Utilities // parse buttons #if SMAPI_FOR_MOBILE string[] rawButtons = input.Split('+', StringSplitOptions.RemoveEmptyEntries); + for (int i = 0; i < rawButtons.Length; i++) + rawButtons[i] = rawButtons[i].Trim(); #else string[] rawButtons = input.Split('+', StringSplitOptions.TrimEntries); #endif