From ce2e3045bad021ba833c91dcc45b779a57752960 Mon Sep 17 00:00:00 2001 From: djk Date: Sun, 31 Oct 1999 21:59:59 +0000 Subject: [PATCH] fxied infinite loop --- perl/client.pl | 4 ++++ perl/console.pl | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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]; -- 2.43.0