diff tools/ppl.c @ 1962:951e07b80b40

If pattern has less channels than what fits on the screen, and active channels is last channel, a bug occurs. Fixed.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 30 Jun 2018 05:47:31 +0300
parents 6147dd3fa5d2
children 7a4a7c2619ee
line wrap: on
line diff
--- a/tools/ppl.c	Sat Jun 30 05:40:40 2018 +0300
+++ b/tools/ppl.c	Sat Jun 30 05:47:31 2018 +0300
@@ -449,6 +449,9 @@
     if (pat == NULL)
         return;
 
+    if (qwidth > pat->nchannels)
+        qwidth = pat->nchannels;
+
     if (engine.actChannel < qwidth / 2)
         choffs = 0;
     else