From 301667245bbf232bec71c79a891f6c6fdcfb2c1f Mon Sep 17 00:00:00 2001 From: Wolfram Schneider Date: Fri, 23 Apr 2010 17:42:08 +0200 Subject: [PATCH] do not try to print more rows than available --- web/htdocs/details/stats.mc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/htdocs/details/stats.mc b/web/htdocs/details/stats.mc index 97eb639..e50f56a 100644 --- a/web/htdocs/details/stats.mc +++ b/web/htdocs/details/stats.mc @@ -83,7 +83,7 @@ $col3 => undef my $hr; $hr = $stats->{$data}; my @sorted = sort { $hr->{$b} <=> $hr->{$a} || $a <=> $b } keys %$hr; -my $n = @sorted; $n = $maxrows if @sorted > 10; +my $n = @sorted; $n = $maxrows if @sorted > 10 && $n > $maxrows; foreach my $i (1..$n) { my $key = $sorted[$i-1]; -- 1.7.10.4