Skip to content

Commit

Permalink
fix music without segments causing crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Bauumm committed Jun 26, 2024
1 parent 8583381 commit 51e9db3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions game_handler/assets.lua
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ function assets.get_pack(version, id, headless)
end
end
if pack_data.game_version ~= 21 then
music_json.segments = music_json.segments or {}
for i = 1, #music_json.segments do
if type(music_json.segments[i]) == "table" then
music_json.segments[i].time = math.floor(music_json.segments[i].time)
Expand Down

0 comments on commit 51e9db3

Please sign in to comment.