mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-24 11:42:35 +01:00
Factoids: fix index() $var modifier
This commit is contained in:
parent
a50751ef4e
commit
9a165a129c
@ -590,7 +590,7 @@ sub expand_factoid_vars {
|
||||
|
||||
my $replacement;
|
||||
|
||||
if ($settings{'index'}) {
|
||||
if (exists $settings{'index'}) {
|
||||
my $index = $settings{'index'};
|
||||
$index = 0 if $index < 0;
|
||||
$index = $#mylist if $index > $#mylist;
|
||||
|
Loading…
Reference in New Issue
Block a user