diff options
author | Eric Wong <e@80x24.org> | 2016-12-20 23:42:35 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-12-21 07:32:37 +0000 |
commit | 93474f58d361b2ace4d5e51d5be4c220513da8d0 (patch) | |
tree | a3522a46b9a4ad73cb85a11670508078f19ce9db /lib | |
parent | 478d03688600a4c7b50e205d15d76113e019f3cd (diff) | |
download | public-inbox-93474f58d361b2ace4d5e51d5be4c220513da8d0.tar.gz |
It definitely is necessary to prevent looping with the %seen hash.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/PublicInbox/SearchThread.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/SearchThread.pm b/lib/PublicInbox/SearchThread.pm index 601a84b0..fafe7d7b 100644 --- a/lib/PublicInbox/SearchThread.pm +++ b/lib/PublicInbox/SearchThread.pm @@ -129,7 +129,7 @@ sub add_child { sub has_descendent { my ($self, $child) = @_; - my %seen; # loop prevention XXX may not be necessary + my %seen; # loop prevention while ($child) { return 1 if $self == $child || $seen{$child}++; $child = $child->{parent}; |