2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 05:16:45 +00:00

minor fix

git-svn-id: https://svn.fhem.de/fhem/trunk@4859 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2014-02-09 16:33:35 +00:00
parent 04a567d8a4
commit 8837e5e179

View File

@ -962,7 +962,8 @@ sub Calendar_Get($@) {
if(defined($a[3])) { if(defined($a[3])) {
my $keep= $a[3]; my $keep= $a[3];
return "Argument $keep is not a number." unless($keep =~ /\d+/); return "Argument $keep is not a number." unless($keep =~ /\d+/);
splice @texts, $keep if($#texts>= 0 && $#texts >= $keep); $keep= $#texts+1 if($keep> $#texts);
splice @texts, $keep if($keep>= 0);
} }
return join("\n", @texts); return join("\n", @texts);