diff options
author | Jeff Sturm <jsturm@one-point.com> | 2003-11-18 04:54:53 +0000 |
---|---|---|
committer | Jeff Sturm <jsturm@one-point.com> | 2003-11-18 04:54:53 +0000 |
commit | 883717c461137779538cdb6dc0a80c37a3017fc9 (patch) | |
tree | b9d308ed474829f91edde0179cba98a3a9d3612c /java/io/ByteArrayOutputStream.java | |
parent | ef177ff5137bf3c7245646130ffdbc1419d2b311 (diff) | |
download | classpath-883717c461137779538cdb6dc0a80c37a3017fc9.tar.gz |
* java/io/ByteArrayOutputStream.java (resize): Fix off-by-one error.
Diffstat (limited to 'java/io/ByteArrayOutputStream.java')
-rw-r--r-- | java/io/ByteArrayOutputStream.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/io/ByteArrayOutputStream.java b/java/io/ByteArrayOutputStream.java index 3e3e0c200..2e89cf5ee 100644 --- a/java/io/ByteArrayOutputStream.java +++ b/java/io/ByteArrayOutputStream.java @@ -198,7 +198,7 @@ public class ByteArrayOutputStream extends OutputStream // Resize buffer to accommodate new bytes. private void resize (int add) { - if (count + add >= buf.length) + if (count + add > buf.length) { int newlen = buf.length * 2; if (count + add > newlen) |