Minor fix
This commit is contained in:
parent
fc6dc349da
commit
a5a10e60cb
|
@ -201,9 +201,9 @@ namespace StardewModdingAPI.Patches
|
||||||
newInsns.Add(insn);
|
newInsns.Add(insn);
|
||||||
Label continueLabel = gen.DefineLabel();
|
Label continueLabel = gen.DefineLabel();
|
||||||
Label retLabel = 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.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.Call, AccessTools.PropertyGetter(typeof(string), nameof(string.Length))));
|
||||||
newInsns.Add(new CodeInstruction(OpCodes.Ldc_I4_0));
|
newInsns.Add(new CodeInstruction(OpCodes.Ldc_I4_0));
|
||||||
newInsns.Add(new CodeInstruction(OpCodes.Cgt));
|
newInsns.Add(new CodeInstruction(OpCodes.Cgt));
|
||||||
|
|
|
@ -56,6 +56,8 @@ namespace StardewModdingAPI.Utilities
|
||||||
// parse buttons
|
// parse buttons
|
||||||
#if SMAPI_FOR_MOBILE
|
#if SMAPI_FOR_MOBILE
|
||||||
string[] rawButtons = input.Split('+', StringSplitOptions.RemoveEmptyEntries);
|
string[] rawButtons = input.Split('+', StringSplitOptions.RemoveEmptyEntries);
|
||||||
|
for (int i = 0; i < rawButtons.Length; i++)
|
||||||
|
rawButtons[i] = rawButtons[i].Trim();
|
||||||
#else
|
#else
|
||||||
string[] rawButtons = input.Split('+', StringSplitOptions.TrimEntries);
|
string[] rawButtons = input.Split('+', StringSplitOptions.TrimEntries);
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue