diff options
| author | Flavio Poletti <flavio@polettix.it> | 2023-03-28 07:01:29 +0200 |
|---|---|---|
| committer | Flavio Poletti <flavio@polettix.it> | 2023-03-28 07:01:29 +0200 |
| commit | 39f196f77e492f8bfafcf1b5c23eea2c28040de7 (patch) | |
| tree | c3047648cbe81f6801f6d7b3004b9a07cda0980c | |
| parent | 8915a66de2cb2a724aee5e55ddfc15580cfdf1d5 (diff) | |
| download | perlweeklychallenge-club-39f196f77e492f8bfafcf1b5c23eea2c28040de7.tar.gz perlweeklychallenge-club-39f196f77e492f8bfafcf1b5c23eea2c28040de7.tar.bz2 perlweeklychallenge-club-39f196f77e492f8bfafcf1b5c23eea2c28040de7.zip | |
Remove bug noted by github/oldtechaa
| -rw-r--r-- | challenge-209/polettix/perl/ch-2.pl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-209/polettix/perl/ch-2.pl b/challenge-209/polettix/perl/ch-2.pl index b6c7fe78e4..8ed759586b 100644 --- a/challenge-209/polettix/perl/ch-2.pl +++ b/challenge-209/polettix/perl/ch-2.pl @@ -68,8 +68,8 @@ sub merge_accounts ($aref) { if (defined($last_wiped)) { my $marker = my $cursor = $last_wiped; while (++$cursor < $all_groups->$#*) { - next if defined($all_groups->[$cursor]); - $all_groups->[$marker++] = $all_groups->[$cursor]; + $all_groups->[$marker++] = $all_groups->[$cursor] + if defined($all_groups->[$cursor]); } splice $all_groups->@*, $marker if $marker < $all_groups->@*; } |
