Skip to content

Commit

Permalink
Fixed an bug where stage music would break if no songs were available…
Browse files Browse the repository at this point in the history
… for a stage/menu
  • Loading branch information
bkacjios committed Jul 17, 2020
1 parent c978f50 commit be8ad8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ end
function love.musicUpdate()
if not memory.isMelee() or not PANEL_SETTINGS:PlayStageMusic() then return end
if STAGE_SONG == nil or not STAGE_SONG:isPlaying() then
if STAGE_ID and STAGE_SONGS[STAGE_ID] and (memory.menu == 2 or memory.menu == 0) then
if STAGE_ID and STAGE_SONGS[STAGE_ID] and #STAGE_SONGS[STAGE_ID] > 0 and (memory.menu == 2 or memory.menu == 0) then
STAGE_SONG_TRACK = (STAGE_SONG_TRACK + 1) % (#STAGE_SONGS[STAGE_ID])
STAGE_SONG = STAGE_SONGS[STAGE_ID][STAGE_SONG_TRACK + 1]
if STAGE_SONG then
Expand Down

0 comments on commit be8ad8a

Please sign in to comment.