From 350402f8f3df11bb5a576965273224368d12797f Mon Sep 17 00:00:00 2001 From: "5684185+vsariola@users.noreply.github.com" <5684185+vsariola@users.noreply.github.com> Date: Wed, 14 Aug 2024 19:41:44 +0300 Subject: [PATCH] fix(vm): prevent crash when only disabled delay units & test it --- vm/delaytable.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vm/delaytable.go b/vm/delaytable.go index 3d21544..f62ce0e 100644 --- a/vm/delaytable.go +++ b/vm/delaytable.go @@ -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]] } }