bug fix, undefined value possible

This commit is contained in:
Harald Hope 2023-11-02 20:00:09 -07:00
parent bf13ee49a8
commit 8c3b64c74d

1
inxi
View file

@ -26492,6 +26492,7 @@ sub load_sys_data {
$adapter .= '-' . $hwmons{$hwmon}->{'device'}; $adapter .= '-' . $hwmons{$hwmon}->{'device'};
($unit,$value,@values) = (); ($unit,$value,@values) = ();
foreach my $item (@{$hwmons{$hwmon}->{'sensors'}}){ foreach my $item (@{$hwmons{$hwmon}->{'sensors'}}){
next if !defined $item->{'id'};
my $name = ($item->{'label'}) ? $item->{'label'}: $item->{'id'}; my $name = ($item->{'label'}) ? $item->{'label'}: $item->{'id'};
if ($item->{'id'} =~ /^temp/){ if ($item->{'id'} =~ /^temp/){
$unit = 'C'; $unit = 'C';