From 121de07ae2e9739e458796d1c8bab4781d6237bd Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Tue, 1 Aug 2017 21:31:58 -0700 Subject: [PATCH] Whoops, attempted to modify current $action in loop --- PBot/Factoids.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PBot/Factoids.pm b/PBot/Factoids.pm index a92b85d0..7546deaf 100644 --- a/PBot/Factoids.pm +++ b/PBot/Factoids.pm @@ -431,7 +431,8 @@ sub expand_action_arguments { $input =~ s/'/\\'/g if defined $input; my @args = shellwords($input); - while ($action =~ m/\$arg\[([^]]+)]/g) { + my $const_action = $action; + while ($const_action =~ m/\$arg\[([^]]+)]/g) { my $arg = $1; if ($arg eq '*') {