2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

Avoid div by 0

git-svn-id: https://svn.fhem.de/fhem/trunk@15 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2007-02-14 11:06:00 +00:00
parent 0b24944d75
commit bd7a4c66a4

View File

@ -286,6 +286,7 @@ getDevData()
my $end = $start + int(($nrreadings-1)/64)*$step; my $end = $start + int(($nrreadings-1)/64)*$step;
my $offset = ($nrreadings%64)*4+4; my $offset = ($nrreadings%64)*4+4;
my $div = w($d,49)/10; my $div = w($d,49)/10;
$div = 1 if($div == 0);
#printf("Total $nrreadings, $start - $end, Nr $step, Off: $offset\n"); #printf("Total $nrreadings, $start - $end, Nr $step, Off: $offset\n");