mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2024-12-23 21:56:46 +00:00
Merge pull request #686 from FunkinCrew/applehair/freeplay-stack-overflow
[PUBLIC PR] Fix a stack overflow for songs with no "Normal" difficulty
This commit is contained in:
commit
cee5d53deb
|
@ -2149,8 +2149,14 @@ class FreeplaySongData
|
|||
|
||||
function updateValues(variations:Array<String>):Void
|
||||
{
|
||||
this.songDifficulties = song.listSuffixedDifficulties(variations, false, false);
|
||||
if (!this.songDifficulties.contains(currentDifficulty)) currentDifficulty = Constants.DEFAULT_DIFFICULTY;
|
||||
this.songDifficulties = song.listDifficulties(null, variations, false, false);
|
||||
if (!this.songDifficulties.contains(currentDifficulty))
|
||||
{
|
||||
currentDifficulty = Constants.DEFAULT_DIFFICULTY;
|
||||
// This method gets called again by the setter-method
|
||||
// or the difficulty didn't change, so there's no need to continue.
|
||||
return;
|
||||
}
|
||||
|
||||
var songDifficulty:SongDifficulty = song.getDifficulty(currentDifficulty, null, variations);
|
||||
if (songDifficulty == null) return;
|
||||
|
|
Loading…
Reference in a new issue