Commit Diff
- Commit:
6045cf8739a6d44f26acba93d5405adff29f8cee
- From:
- Omar Polo <op@omarpolo.com>
- Date:
- Message:
- 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.
- Actions:
- Patch | Tree
--- 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;