diff --git a/PKHeX.Core/Saves/SAV9SV.cs b/PKHeX.Core/Saves/SAV9SV.cs index a352ec299..035483a64 100644 --- a/PKHeX.Core/Saves/SAV9SV.cs +++ b/PKHeX.Core/Saves/SAV9SV.cs @@ -343,10 +343,12 @@ public sealed class SAV9SV : SaveFile, ISaveBlock9Main, ISCBlockArray, ISaveFile public void UnlockAllTMRecipes() { - for (int i = 1; i <= 201; i++) + for (int i = 1; i <= 229; i++) { var flag = $"FSYS_UI_WAZA_MACHINE_RELEASE_{i:000}"; var hash = (uint)FnvHash.HashFnv1a_64(flag); + if (!Accessor.HasBlock(hash)) + continue; var block = Accessor.GetBlock(hash); block.ChangeBooleanType(SCTypeCode.Bool2); } diff --git a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9.cs b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9.cs index 5e01069a7..8d68bb50d 100644 --- a/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9.cs +++ b/PKHeX.WinForms/Subforms/Save Editors/Gen9/SAV_Trainer9.cs @@ -276,7 +276,11 @@ public partial class SAV_Trainer9 : Form }; var accessor = SAV.Accessor; foreach (var block in blocks) + { + if (!accessor.HasBlock(block)) + continue; accessor.GetBlock(block).ChangeBooleanType(SCTypeCode.Bool2); + } System.Media.SystemSounds.Asterisk.Play(); }