Commit 0ea09195 authored by Peter McKenzie's avatar Peter McKenzie

Extremely minor fix to ByteBuffer.

R=r
APPROVED=r
DELTA=1  (0 added, 0 deleted, 1 changed)
OCL=27123
CL=27130
parent 7b778512
......@@ -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);
......
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