3
0
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:
Pragmatic Software 2020-05-29 22:22:22 -07:00
parent a50751ef4e
commit 9a165a129c

View File

@ -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;