]> dxcluster.org Git - spider.git/commitdiff
fxied infinite loop
authordjk <djk>
Sun, 31 Oct 1999 21:59:59 +0000 (21:59 +0000)
committerdjk <djk>
Sun, 31 Oct 1999 21:59:59 +0000 (21:59 +0000)
perl/client.pl
perl/console.pl

index a7185ab208de387c0a58df593ca3c4597e2a5151..459c26323a34480131247918043d9124649962dd 100755 (executable)
@@ -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/");
index ceac24e278890d1275fa6f904761d1993355061e..cec17ab4495b5fc2e14833df17cf2b6b7de174f6 100755 (executable)
@@ -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];