Fix show/wcy if no broadcasts received
[spider.git] / perl / WCY.pm
index 1df87e802b907d56e237d3d61686e8052cf6761b..534d89d76ca9b2ce3ecf7dbaafe551d70e5501b2 100644 (file)
@@ -171,7 +171,7 @@ sub search
        my $count;
        my $i;
 
-       if ($t == $main::systime && ($to <= $maxcache)) {
+       if ($t == $main::systime && ($to && $to <= @cache)) {
                dbg("using wcy cache") if isdbg('wcy');
                @out = reverse @cache;
                pop @out while @out > $to;