From: djk Date: Sun, 31 Oct 1999 21:59:59 +0000 (+0000) Subject: fxied infinite loop X-Git-Tag: R_1_34~21 X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=ce2e3045bad021ba833c91dcc45b779a57752960;p=spider.git fxied infinite loop --- diff --git a/perl/client.pl b/perl/client.pl index a7185ab2..459c2632 100755 --- a/perl/client.pl +++ b/perl/client.pl @@ -270,6 +270,10 @@ sub dochat $line = <$rfh>; $line =~ s/\r//og; } + if (length $line == 0) { + dbg('connect', "received 0 length line, aborting..."); + cease(11); + } dbg('connect', "received \"$line\""); if ($abort && $line =~ /$abort/i) { dbg('connect', "aborted on /$abort/"); diff --git a/perl/console.pl b/perl/console.pl index ceac24e2..cec17ab4 100755 --- a/perl/console.pl +++ b/perl/console.pl @@ -137,7 +137,7 @@ sub measure # display the top screen sub show_screen { - if ($spos == @shistory - 1) { + if ($spos >= @shistory - 1) { # if we really are scrolling thru at the end of the history my $line = $shistory[$spos];