fix(sointu): fix StackUse calculation for empty unit (unit.Type == "")

This commit is contained in:
vsariola 2021-02-17 17:49:53 +02:00
parent 2f0c9a9f04
commit 18d466803f

View File

@ -532,7 +532,7 @@ func (u *Unit) StackChange() int {
func (u *Unit) StackNeed() int {
switch u.Type {
case "envelope", "oscillator", "noise", "receive", "loadnote", "loadval", "in":
case "", "envelope", "oscillator", "noise", "receive", "loadnote", "loadval", "in":
return 0
case "mulp", "mul", "add", "addp", "xch":
return 2 * (1 + u.Parameters["stereo"])