Browse Source

check size in Reset

pull/1269/head
Darien Raymond 6 years ago
parent
commit
b3b0649dd6
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
  1. 3
      common/buf/buffer.go

3
common/buf/buffer.go

@ -67,6 +67,9 @@ func (b *Buffer) Reset(writer Supplier) error {
nBytes, err := writer(b.v)
b.start = 0
b.end = int32(nBytes)
if b.end > int32(len(b.v)) {
b.end = int32(len(b.v))
}
return err
}

Loading…
Cancel
Save