]> Cypherpunks repositories - gostls13.git/commitdiff
Extremely minor fix to ByteBuffer.
authorPeter McKenzie <petermck@google.com>
Tue, 7 Apr 2009 00:03:07 +0000 (17:03 -0700)
committerPeter McKenzie <petermck@google.com>
Tue, 7 Apr 2009 00:03:07 +0000 (17:03 -0700)
R=r
APPROVED=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=27123
CL=27130

src/lib/io/bytebuffer.go

index cb2d44815a56361c53abad97d8d3ca80e93b9f78..440f265c538f1cb00b7af3dcbf8474a4ae4c9982 100644 (file)
@@ -47,7 +47,7 @@ func (b *ByteBuffer) Write(p []byte) (n int, err *os.Error) {
                b.buf = make([]byte, b.cap);
                b.len = 0;
        }
-       if b.len + len(p) > b.cap {
+       if b.len + plen > b.cap {
                b.cap = 2*(b.cap + plen);
                nb := make([]byte, b.cap);
                bytecopy(nb, 0, b.buf, 0, b.len);