2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +00:00

73_ElectricityCalculator: bugfix: crash due wrong hash pointer assignment

git-svn-id: https://svn.fhem.de/fhem/trunk@12206 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
sailor-fhem 2016-09-24 17:48:18 +00:00
parent 52044cbc51
commit 3f12ed4620

View File

@ -247,7 +247,7 @@ sub ElectricityCalculator_Get($@)
my $value; my $value;
my $ReturnMessage; my $ReturnMessage;
if(!defined(%{$hash->{helper}{gets}{$reading}})) if(!defined($hash->{helper}{gets}{$reading}))
{ {
my @cList = keys %{$hash->{helper}{gets}}; my @cList = keys %{$hash->{helper}{gets}};
return "Unknown argument $reading, choose one of " . join(" ", @cList); return "Unknown argument $reading, choose one of " . join(" ", @cList);
@ -288,7 +288,7 @@ sub ElectricityCalculator_Set($@)
my $value = join(" ", @a); my $value = join(" ", @a);
my $ReturnMessage; my $ReturnMessage;
if(!defined(%{$hash->{helper}{sets}{$reading}})) if(!defined($hash->{helper}{gets}{$reading}))
{ {
my @cList = keys %{$hash->{helper}{sets}}; my @cList = keys %{$hash->{helper}{sets}};
return "Unknown argument $reading, choose one of " . join(" ", @cList); return "Unknown argument $reading, choose one of " . join(" ", @cList);