From bd7a4c66a44535dd36b82ede7c8a97996caae75a Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Wed, 14 Feb 2007 11:06:00 +0000 Subject: [PATCH] Avoid div by 0 git-svn-id: https://svn.fhem.de/fhem/trunk@15 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/em1010.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/fhem/contrib/em1010.pl b/fhem/contrib/em1010.pl index 53ebbb654..03e5b29f5 100755 --- a/fhem/contrib/em1010.pl +++ b/fhem/contrib/em1010.pl @@ -286,6 +286,7 @@ getDevData() my $end = $start + int(($nrreadings-1)/64)*$step; my $offset = ($nrreadings%64)*4+4; my $div = w($d,49)/10; + $div = 1 if($div == 0); #printf("Total $nrreadings, $start - $end, Nr $step, Off: $offset\n");