summaryrefslogtreecommitdiff
path: root/src/lib/io/bytebuffer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/io/bytebuffer.go')
-rw-r--r--src/lib/io/bytebuffer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/io/bytebuffer.go b/src/lib/io/bytebuffer.go
index cb2d44815..440f265c5 100644
--- a/src/lib/io/bytebuffer.go
+++ b/src/lib/io/bytebuffer.go
@@ -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);