Browse Source

fix length calculation in bufferToBytesReader.WriteTo

pull/684/merge
Darien Raymond 7 years ago
parent
commit
2f5d501643
  1. 2
      common/buf/reader.go

2
common/buf/reader.go

@ -73,10 +73,10 @@ func (r *bufferToBytesReader) writeToInternal(writer io.Writer) (int64, error) {
mbWriter := NewWriter(writer)
totalBytes := int64(0)
if r.leftOver != nil {
totalBytes += int64(r.leftOver.Len())
if err := mbWriter.Write(r.leftOver); err != nil {
return 0, err
}
totalBytes += int64(r.leftOver.Len())
}
for {

Loading…
Cancel
Save