diff options
author | eea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-06-24 20:29:07 +0000 |
---|---|---|
committer | eea1 <eea1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1997-06-24 20:29:07 +0000 |
commit | 465b88969f2cdcb8787ac7936caaf6dbcd17fbf7 (patch) | |
tree | 53be9b143e6be16d550f637cdc860d0766360d55 /java | |
parent | 9c0c1f6c4c6e8ff3e28912db40433019bbd9f52b (diff) | |
download | ATCD-465b88969f2cdcb8787ac7936caaf6dbcd17fbf7.tar.gz |
*** empty log message ***
Diffstat (limited to 'java')
-rw-r--r-- | java/src/SOCKStream.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/java/src/SOCKStream.java b/java/src/SOCKStream.java index 079dcb05c3c..58498597e88 100644 --- a/java/src/SOCKStream.java +++ b/java/src/SOCKStream.java @@ -84,7 +84,7 @@ public class SOCKStream { // Get the data out String buf = s.toString (); - this.oStream_.print (buf); + this.oStream_.print(buf); this.oStream_.flush (); return buf.length (); } @@ -125,7 +125,10 @@ public class SOCKStream { String temp = this.iStream_.readLine (); s.append (temp); - return temp.length (); + if (temp == null) // Possible if user sends just a line feed, but + return -1; // not checking would cause a null ptr exception + else + return temp.length (); } /** |