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:
Octavian Damiean 2013-06-30 22:04:00 +02:00
parent 907f956452
commit 9d96a82c80

View File

@ -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))"
}