FormatOutput(): Add missing variable init.

Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
Thomas Hochstein 2026-01-17 02:47:53 +01:00
parent 8734008ab0
commit deb812da58
2 changed files with 4 additions and 0 deletions

View file

@ -5,6 +5,7 @@ NewsStats 0.5.0 (unreleased)
* Add addpost (to add post data dropped by feedlog). * Add addpost (to add post data dropped by feedlog).
* Rename postingstats.pl to poststats.pl, rename * Rename postingstats.pl to poststats.pl, rename
dopostingstats.sh accordingly, fix all references. dopostingstats.sh accordingly, fix all references.
* Fix missing variable initialisation in FormatOutput().
NewsStats 0.4.0 (2025-06-02) NewsStats 0.4.0 (2025-06-02)
* Reformat $Conf{TLH} for GroupStats only. * Reformat $Conf{TLH} for GroupStats only.

View file

@ -501,6 +501,9 @@ sub FormatOutput {
my ($Format, $Comments, $LeadIn, $Caption, $Key, $Value, $Precision, $PadField, my ($Format, $Comments, $LeadIn, $Caption, $Key, $Value, $Precision, $PadField,
$PadValue, $LastIteration) = @_; $PadValue, $LastIteration) = @_;
my ($Output); 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 # create one line of output
if ($Format eq 'dump') { if ($Format eq 'dump') {
# output as dump (key value) # output as dump (key value)