mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-03 17:18:20 -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 {
|
label := func(gtx C) D {
|
||||||
c := float32(0.0)
|
c := float32(0.0)
|
||||||
voice := t.Song().Patch.FirstVoiceForInstrument(i)
|
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]
|
vc := ie.voiceStates[voice]
|
||||||
if c < vc {
|
if c < vc {
|
||||||
c = vc
|
c = vc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user