public inbox for frysk@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Frysk List <frysk@sourceware.org>
Subject: fix for fhpd buglet
Date: Wed, 16 May 2007 17:18:00 -0000	[thread overview]
Message-ID: <m34pmciuvg.fsf@fleche.redhat.com> (raw)

I tried fhpd today and I noticed that if I typed Control-D at the
prompt, it threw a null pointer exception.  Patch appended.

Tom

Index: frysk-core/frysk/bindir/ChangeLog
from  Tom Tromey  <tromey@redhat.com>

	* fhpd.java (main): Exit loop if line==null.

Index: frysk-core/frysk/bindir/fhpd.java
===================================================================
RCS file: /cvs/frysk/frysk-core/frysk/bindir/fhpd.java,v
retrieving revision 1.8
diff -u -r1.8 fhpd.java
--- frysk-core/frysk/bindir/fhpd.java 3 May 2007 20:29:39 -0000 1.8
+++ frysk-core/frysk/bindir/fhpd.java 16 May 2007 16:56:15 -0000
@@ -125,7 +125,7 @@
     reader.addCompletor(fhpdCompletor);
     try {
       cli.execCommand(line);
-      while (! (line.equals("quit") || line.equals("q"))) 
+      while (line != null && ! (line.equals("quit") || line.equals("q"))) 
 	{
 	  line = reader.readLine(cli.getPrompt());
 	  cli.execCommand(line);

             reply	other threads:[~2007-05-16 17:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-16 17:18 Tom Tromey [this message]
2007-05-17 17:17 ` Stan Cox
2007-05-18  6:33   ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m34pmciuvg.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=frysk@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).