Просмотр исходного кода

* Fix problem where NFiles didn't work when the specified values was more
than the actual number of logfiles (thanks, Christoph Berg)

Morten Brix Pedersen 22 лет назад
Родитель
Сommit
2b8d608198
2 измененных файлов с 5 добавлено и 1 удалено
  1. 4 0
      docs/Changelog
  2. 1 1
      modules/Pisg/Parser/Logfile.pm

+ 4 - 0
docs/Changelog

@@ -1,3 +1,7 @@
+pisg (x.xx)
+   * Fix problem where NFiles didn't work when the specified values was more
+   than the actual number of logfiles (thanks, Christoph Berg)
+
 pisg (0.56) - Sat Jun, 19th 2004
    * Fix parsing of energymech kick messages and modes (thanks, optika81)
    * Add colorscheme with traditional pisg (website) colors. Thanks, mite.

+ 1 - 1
modules/Pisg/Parser/Logfile.pm

@@ -231,7 +231,7 @@ sub _parse_dir
 
         if($self->{cfg}->{nfiles} > 0) {
             my $shift = @filesarray - $self->{cfg}->{nfiles};
-            splice(@filesarray, 0, $shift);
+            splice(@filesarray, 0, $shift) if $shift > 0;
         }
 
         foreach my $file (@filesarray) {