14_CUL_MAX: check that address has 6 digits

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@7004 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2014-11-16 20:57:00 +00:00
parent 7efd8522ac
commit ebb5596cd3

View File

@ -85,6 +85,11 @@ CUL_MAX_Define($$)
}
$modules{CUL_MAX}{defptr} = $hash;
if (length($a[2]) != 6) {
Log 1, "The adress must be 6 hexadecimal digits";
return "The adress must be 6 hexadecimal digits";
}
$hash->{addr} = lc($a[2]);
$hash->{STATE} = "Defined";
$hash->{cnt} = 0;