Fix bug in song.go: len(s.Patterns) should have been len(s.Tracks).

This commit is contained in:
Veikko Sariola 2020-10-26 12:48:33 +02:00
parent 470ba28592
commit debeaa181c

View File

@ -42,7 +42,7 @@ func (s *Song) Validate() error {
return errors.New("Every pattern should have the same length")
}
}
for i := range s.Tracks[:len(s.Patterns)-1] {
for i := range s.Tracks[:len(s.Tracks)-1] {
if len(s.Tracks[i].Sequence) != len(s.Tracks[i+1].Sequence) {
return errors.New("Every track should have the same sequence length")
}