mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-16 16:56:04 +00:00
00_ZWDongle.pm: check for non-decimal numbers
git-svn-id: https://svn.fhem.de/fhem/trunk@21865 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
69adf7d829
commit
3671d17c39
@ -389,7 +389,7 @@ ZWDongle_Set($@)
|
||||
$_ =~ s/^UNKNOWN_//;
|
||||
$_ = hex($defs{$_}{nodeIdHex})
|
||||
if($defs{$_} && $defs{$_}{nodeIdHex});
|
||||
return "$_ is neither a device nor a decimal id" if($_ !~ m/\d+/);
|
||||
return "$_ is neither a device nor a decimal id" if($_ !~ m/^\d+$/);
|
||||
}
|
||||
}
|
||||
|
||||
@ -471,6 +471,7 @@ ZWDongle_Get($@)
|
||||
|
||||
$a[0] = hex($defs{$a[0]}{nodeIdHex})
|
||||
if($defs{$a[0]} && $defs{$a[0]}{nodeIdHex});
|
||||
return "$a[0] is neither a device nor a decimal id" if($a[0] !~ m/^\d+$/);
|
||||
}
|
||||
|
||||
my $out = sprintf($gets{$cmd}, @a);
|
||||
|
Loading…
x
Reference in New Issue
Block a user