Added null check for count in _lp_temp_sensors() to stop division by zero errors in case count is still zero.
This commit is contained in:
parent
907f956452
commit
9d96a82c80
@ -1200,6 +1200,9 @@ _lp_temp_sensors() {
|
||||
temperature=$(($temperature+$i))
|
||||
count=$(($count+1))
|
||||
done
|
||||
if test $count -eq 0; then
|
||||
exit
|
||||
fi
|
||||
echo -ne "$(($temperature/$count))"
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user