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:
parent
0b24944d75
commit
bd7a4c66a4
@ -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");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user