From 181c7f05d47d4abea62618b3b6d24b2298585247 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