diff --git a/html/cgi-bin/logs.cgi/firewalllog.dat b/html/cgi-bin/logs.cgi/firewalllog.dat index 73e62eab0..2711eba3b 100644 --- a/html/cgi-bin/logs.cgi/firewalllog.dat +++ b/html/cgi-bin/logs.cgi/firewalllog.dat @@ -285,7 +285,8 @@ END &Header::openbox('100%', 'left', $Lang::tr{'log'}); print "
$Lang::tr{'firewall hits'} $date: $lines
"; -$start = $lines - ${Header::viewsize} if ($start >= $lines - ${Header::viewsize}); +my $lastPageIndex = $lines - ${Header::viewsize}; +$start = $lastPageIndex if ($start >= $lastPageIndex); $start = 0 if ($start < 0); my $prev; @@ -297,7 +298,7 @@ my $prev; } my $next; - if ($start == $lines - ${Header::viewsize}) { + if ($start == $lastPageIndex) { $next = -1; } else { $next = $start + ${Header::viewsize}; @@ -402,16 +403,18 @@ END print "