From 9a165a129c194a7a271b48bbb1c60a8efb52167a Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Fri, 29 May 2020 22:22:22 -0700 Subject: [PATCH] Factoids: fix index() $var modifier --- PBot/Factoids.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index 45fbcab9..c0f4b3f1 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -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;