From 32f438d88786c23eb610301bafb8a3fa04ed33e5 Mon Sep 17 00:00:00 2001 From: FajsiEx Date: Thu, 12 Aug 2021 21:47:16 +0200 Subject: [PATCH] / diff indexes on songs overflowing causing some songs to dissapear --- scripts/songselect/songwheel.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/songselect/songwheel.lua b/scripts/songselect/songwheel.lua index 22b8820..ae02fa8 100644 --- a/scripts/songselect/songwheel.lua +++ b/scripts/songselect/songwheel.lua @@ -252,7 +252,7 @@ function drawSong(song, y) if (not song) then return end; 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 return;