From a2f81143e1f8ae1a3779e3efdedd8d58cd709c89 Mon Sep 17 00:00:00 2001 From: Psycast Date: Tue, 30 Jun 2020 17:51:25 -0230 Subject: [PATCH] Fix index bounds error on setActiveID. (#152) --- src/menu/MenuSongSelection.as | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu/MenuSongSelection.as b/src/menu/MenuSongSelection.as index 74575d32..42ac1950 100644 --- a/src/menu/MenuSongSelection.as +++ b/src/menu/MenuSongSelection.as @@ -1566,7 +1566,7 @@ package menu private function setActiveID(index:int, mpUpdate:Boolean):void { - options.activeSongID = (songItems[index] != null ? songItems[index].level : -1); + options.activeSongID = (songItems.length > 0 && index < songItems.length ? songItems[index].level : -1); _gvars.tempFlags['active_songid_temp'] = options.activeSongID; if (mpUpdate && options.activeSongID != -1) _mp.gameplayPicking(_playlist.getSong(options.activeSongID));