mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-11-26 06:09:02 +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
|
function updateValues(variations:Array<String>):Void
|
||||||
{
|
{
|
||||||
this.songDifficulties = song.listSuffixedDifficulties(variations, false, false);
|
this.songDifficulties = song.listDifficulties(null, variations, false, false);
|
||||||
if (!this.songDifficulties.contains(currentDifficulty)) currentDifficulty = Constants.DEFAULT_DIFFICULTY;
|
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);
|
var songDifficulty:SongDifficulty = song.getDifficulty(currentDifficulty, null, variations);
|
||||||
if (songDifficulty == null) return;
|
if (songDifficulty == null) return;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue