fix(vm): prevent crash when only disabled delay units & test it

This commit is contained in:
5684185+vsariola@users.noreply.github.com 2024-08-14 19:41:44 +03:00
parent 75bd9c591e
commit 350402f8f3

View File

@ -142,7 +142,7 @@ func constructDelayTimeTable(patch sointu.Patch, bpm int) ([]int, [][]int) {
for i, instr := range patch {
unitindices[i] = make([]int, len(instr.Units))
for j, unit := range instr.Units {
if unit.Type == "delay" {
if unit.Type == "delay" && !unit.Disabled {
unitindices[i][j] = indices[ind[i][j]]
}
}