]> Sergey Matveev's repositories - public-inbox.git/commitdiff
view: avoid warning from negative repeat counts
authorEric Wong <e@80x24.org>
Wed, 29 Nov 2017 09:29:24 +0000 (09:29 +0000)
committerEric Wong <e@80x24.org>
Wed, 29 Nov 2017 09:29:24 +0000 (09:29 +0000)
Perl 5.22 started warning about this.

lib/PublicInbox/View.pm

index ad94977a244693c9531403780b733d9997f738f2..41f1321e4251e6c80e322c3dd69004b3c9524b4f 100644 (file)
@@ -720,7 +720,7 @@ sub ghost_parent {
 
 sub indent_for {
        my ($level) = @_;
-       INDENT x ($level - 1);
+       $level ? INDENT x ($level - 1) : '';
 }
 
 sub load_results {