mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-29 23:36:25 -04:00
fix multibuf len
This commit is contained in:
parent
3137eba542
commit
e6446d43c8
@ -179,9 +179,13 @@ func (mb *MultiBuffer) WriteMultiBuffer(b MultiBuffer) error {
|
||||
}
|
||||
|
||||
// Len returns the total number of bytes in the MultiBuffer.
|
||||
func (mb MultiBuffer) Len() int32 {
|
||||
func (mb *MultiBuffer) Len() int32 {
|
||||
if mb == nil {
|
||||
return 0
|
||||
}
|
||||
|
||||
size := int32(0)
|
||||
for _, b := range mb {
|
||||
for _, b := range *mb {
|
||||
size += b.Len()
|
||||
}
|
||||
return size
|
||||
|
Loading…
Reference in New Issue
Block a user