commit 6045cf8739a6d44f26acba93d5405adff29f8cee from: Omar Polo date: Wed Jul 13 08:45:19 2022 UTC amused-monitor: fix bug when window is taller than playlist adjust the index before reordering the entries, otherwise we may try to read out-of-bound because the reading loop wraps at $lines, not at $tmp size. commit - 63dcef309e50e44d3faa5ce537d8f2935ff9ea67 commit + 6045cf8739a6d44f26acba93d5405adff29f8cee blob - 372c9f2e5995a46a6da87fee718697f30e14931a blob + 16d019fe1dfb7cc4689a8498d17dc19a3ef942fa --- contrib/amused-monitor +++ contrib/amused-monitor @@ -76,6 +76,7 @@ sub excerpt { # reorder the entries my @r; my $len = $#tmp + 1; + $idx = $idx % $len; for (1..$len) { push @r, $tmp[$idx]; $idx = ++$idx % $len;