changeset 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 096046214869
children b080e165a79e
files tools/ppl.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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