/ diff indexes on songs overflowing causing some songs to dissapear

This commit is contained in:
FajsiEx 2021-08-12 21:47:16 +02:00
parent 7ee2e7f0b3
commit 32f438d887
1 changed files with 1 additions and 1 deletions

View File

@ -252,7 +252,7 @@ function drawSong(song, y)
if (not song) then return end; if (not song) then return end;
local songX = desw/2+28 local songX = desw/2+28
local selectedSongDifficulty = song.difficulties[selectedDifficulty] local selectedSongDifficulty = song.difficulties[math.min(selectedDifficulty, #song.difficulties)] -- Limit selecting difficulty that is above the number that the song has
if not selectedSongDifficulty then if not selectedSongDifficulty then
return; return;