mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
10_ZWave.pm: report error on non-decimal input
git-svn-id: https://svn.fhem.de/fhem/trunk@8461 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d2570e4fbf
commit
e575fa3900
@ -506,6 +506,13 @@ ZWave_Cmd($$@)
|
||||
return "$type $cmd needs $parTxt" if($nArg != int(@a));
|
||||
}
|
||||
|
||||
if($cmdFmt !~ m/%s/) {
|
||||
for(my $i1 = 0; $i1<int(@a); $i1++) {
|
||||
return "Error: $a[$i1] is not a decimal number"
|
||||
if($a[$i1] !~ m/^[-\d]+$/);
|
||||
}
|
||||
}
|
||||
|
||||
if($cmd =~ m/^config/) {
|
||||
my ($err, $cmd) = ZWave_configCheckParam($hash, $type, $cmd, $cmdFmt, @a);
|
||||
return $err if($err);
|
||||
|
Loading…
Reference in New Issue
Block a user