فهرست منبع

* 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 سال پیش
والد
کامیت
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) {