mirror of
https://github.com/vsariola/sointu.git
synced 2025-05-28 03:10:24 -04:00
fix(tracker/gioui): display voice states crashed if somehow patch had more than 32 voices
This commit is contained in:
parent
cd00067da8
commit
9ef271f1a8
@ -276,7 +276,11 @@ func (ie *InstrumentEditor) layoutInstrumentNames(gtx C, t *Tracker) D {
|
||||
label := func(gtx C) D {
|
||||
c := float32(0.0)
|
||||
voice := t.Song().Patch.FirstVoiceForInstrument(i)
|
||||
for j := 0; j < t.Song().Patch[i].NumVoices; j++ {
|
||||
loopMax := t.Song().Patch[i].NumVoices
|
||||
if loopMax > vm.MAX_VOICES {
|
||||
loopMax = vm.MAX_VOICES
|
||||
}
|
||||
for j := 0; j < loopMax; j++ {
|
||||
vc := ie.voiceStates[voice]
|
||||
if c < vc {
|
||||
c = vc
|
||||
|
Loading…
Reference in New Issue
Block a user