Skip to content

Commit

Permalink
fix off by one bug
Browse files Browse the repository at this point in the history
  • Loading branch information
cpiemontese committed Aug 30, 2024
1 parent 518b170 commit b32d02e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Assets/Scripts/GameManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void Awake()
_difficulty = PrefsManager.difficulty;
UpdateMusicSource();

if (_difficulty <= difficultyToggles.Length)
if (_difficulty < difficultyToggles.Length)
{
difficultyToggles[_difficulty].group.SetAllTogglesOff();
difficultyToggles[_difficulty].isOn = true;
Expand Down

0 comments on commit b32d02e

Please sign in to comment.