diff options
| -rwxr-xr-x | dbxrecover | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -131,6 +131,7 @@ use warnings; my $self = shift; my $id = shift; my $chain = shift; + my $chains = shift; my $seen = shift; my $combinations = shift; $self->{stats}->{chainsign}++,return if ($combinations > 16); # we don't extract the message if there are too many branches @@ -145,7 +146,7 @@ use warnings; { my $nextchunks = $self->{chunks}->{$chunk->next}; my $nextcount = (ref($nextchunks) eq "ARRAY") ? scalar @{$nextchunks} : 1; - $self->walk_int($chunk->next, $chain, $seen, $combinations * $nextcount); + $self->walk_int($chunk->next, $chain, $chains, $seen, $combinations * $nextcount); } else { @@ -153,7 +154,7 @@ use warnings; my $chainobj = DBX::Chain->new($chain); $self->{stats}->{chainsbroken}++ if $chainobj->broken; $self->{stats}->{chainstot}++; - push @{$self->{chains}}, $chainobj; + push @{$chains}, $chainobj; } pop @{$chain}; } @@ -164,9 +165,9 @@ use warnings; { my $self = shift; my $id = shift; - $self->{chains} = []; - $self->walk_int($id, [], {}, 1); - return $self->{chains}; + my $chains = []; + $self->walk_int($id, [], $chains, {}, 1); + return $chains; } sub stats |
