mirror of
https://github.com/pragma-/pbot.git
synced 2024-12-27 13:12:42 +01:00
Fix factoid var expansion such that 0 can now be yielded
This commit is contained in:
parent
5ee07e08d2
commit
793303fcde
@ -418,7 +418,7 @@ sub expand_factoid_vars {
|
||||
my @list = split(/\s|(".*?")/, $change);
|
||||
my @mylist;
|
||||
for (my $i = 0; $i <= $#list; $i++) {
|
||||
push @mylist, $list[$i] if $list[$i];
|
||||
push @mylist, $list[$i] if defined $list[$i];
|
||||
}
|
||||
my $line = int(rand($#mylist + 1));
|
||||
$mylist[$line] =~ s/"//g;
|
||||
|
Loading…
Reference in New Issue
Block a user