MAX: fix usage of each()

git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@2285 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre
2012-12-08 18:23:16 +00:00
parent 096039e1b8
commit e864c7931c

View File

@@ -98,8 +98,8 @@ MAX_DateTime2Internal($)
sub
MAX_TypeToTypeId($)
{
while (my ($typeId, $type) = each (%device_types)) {
return $typeId if($_[0] eq $type);
foreach (keys %device_types) {
return $_ if($_[0] eq $device_types{$_});
}
Log 1, "MAX_TypeToTypeId: Invalid type $_[0]";
return 0;