Fix last funfest mission record r/w

Closes #3423
This commit is contained in:
Kurt 2022-02-09 10:36:46 -08:00
parent 988385e450
commit f5344452cf
2 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@ public bool IsFunfestMissionsUnlocked
public bool IsFunfestMissionUnlocked(int mission)
{
if ((uint) mission >= MaxMissionIndex)
if ((uint) mission > MaxMissionIndex)
throw new ArgumentOutOfRangeException(nameof(mission));
if (mission == 0)
@ -98,7 +98,7 @@ public bool IsFunfestMissionUnlocked(int mission)
public void UnlockFunfestMission(int mission)
{
if ((uint)mission >= MaxMissionIndex)
if ((uint)mission > MaxMissionIndex)
throw new ArgumentOutOfRangeException(nameof(mission));
IsFunfestMissionsUnlocked = true;

View File

@ -387,7 +387,7 @@ private void LoadFestaMissionRecord()
{
FestaBlock5 block = ((SAV5B2W2) SAV).Festa;
int mission = LB_FunfestMissions.SelectedIndex;
if ((uint) mission >= FestaBlock5.MaxMissionIndex)
if ((uint) mission > FestaBlock5.MaxMissionIndex)
return;
bool unlocked = block.IsFunfestMissionUnlocked(mission);
L_FMUnlocked.Visible = unlocked;
@ -407,7 +407,7 @@ private void ChangeFestaMissionValue(object sender, EventArgs e)
FestaBlock5 block = ((SAV5B2W2)SAV).Festa;
int mission = LB_FunfestMissions.SelectedIndex;
if ((uint)mission >= FestaBlock5.MaxMissionIndex)
if ((uint)mission > FestaBlock5.MaxMissionIndex)
return;
var score = new Funfest5Score((int)NUD_FMBestTotal.Value, (int)NUD_FMBestScore.Value, CB_FMLevel.SelectedIndex & 3, CHK_FMNew.Checked);