Explorar el Código

* 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 hace 22 años
padre
commit
2b8d608198
Se han modificado 2 ficheros con 5 adiciones y 1 borrados
  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) {