Skip to content

Commit

Permalink
Fix index bounds error on setActiveID. (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
Psycast authored Jun 30, 2020
1 parent 400ca2a commit a2f8114
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/menu/MenuSongSelection.as
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit a2f8114

Please sign in to comment.