Commit 773d424b by Jeff Sturm Committed by Jeff Sturm

ByteArrayOutputStream.java (resize): Fix off-by-one error.

* java/io/ByteArrayOutputStream.java (resize):
Fix off-by-one error.

From-SVN: r73359
parent 8a1977f3
2003-11-08 Jeff Sturm <jsturm@one-point.com>
* java/io/ByteArrayOutputStream.java (resize):
Fix off-by-one error.
2003-11-08 Bryce McKinlay <bryce@mckinlay.net.nz>
* gnu/gcj/xlib/XAnyEvent.java (XAnyEvent): Make constructor
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment