diff --git a/doc/ChangeLog b/doc/ChangeLog index 2d46c08..8c3753f 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -5,6 +5,7 @@ NewsStats 0.5.0 (unreleased) * Add addpost (to add post data dropped by feedlog). * Rename postingstats.pl to poststats.pl, rename dopostingstats.sh accordingly, fix all references. + * Fix missing variable initialisation in FormatOutput(). NewsStats 0.4.0 (2025-06-02) * Reformat $Conf{TLH} for GroupStats only. diff --git a/lib/NewsStats.pm b/lib/NewsStats.pm index bce70c5..a68e36d 100644 --- a/lib/NewsStats.pm +++ b/lib/NewsStats.pm @@ -501,6 +501,9 @@ sub FormatOutput { my ($Format, $Comments, $LeadIn, $Caption, $Key, $Value, $Precision, $PadField, $PadValue, $LastIteration) = @_; my ($Output); + # initialise $PadValue; $PadField needs not to be initialised, + # as access to both is gated by valid $PadField + $PadValue = 0 if !$PadValue; # create one line of output if ($Format eq 'dump') { # output as dump (key value)