luxtronik2, statistics: bug fixes

git-svn-id: https://svn.fhem.de/fhem/trunk@6799 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
tpoitzsch
2014-10-21 21:06:06 +00:00
parent d5b71e4009
commit ce9a89aeed
2 changed files with 13 additions and 12 deletions

View File

@@ -969,8 +969,8 @@ statistics_FormatDuration($)
sub ########################################
statistics_maxDecPlaces($$)
{
my ($value,$decMax) = @_;
$decMax = 0 if $decMax == undef;
my ($value, $decMax) = @_;
$decMax = 0 if ! defined $decMax;
if ( $value =~ /.*\.(.*)/ ) {
my $decPlaces = length($1);
$decMax = $decPlaces >= $decMax ? $decPlaces : $decMax;